Browse Source

Merge pull request #27502 from pirgeo

* pr/27502:
  Polish "Improve Dynatrace examples description in reference guide"
  Improve Dynatrace examples description in reference guide

Closes gh-27502
pull/28162/head
Stephane Nicoll 4 years ago
parent
commit
8f3353a154
  1. 20
      spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

20
spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc

@ -170,15 +170,21 @@ The {dynatrace-help}/dynatrace-api/basics/dynatrace-api-authentication/[API toke
We recommend limiting the scope of the token to this one permission. We recommend limiting the scope of the token to this one permission.
You must ensure that the endpoint URI contains the path (for example, `/api/v2/metrics/ingest`): You must ensure that the endpoint URI contains the path (for example, `/api/v2/metrics/ingest`):
The URL of the Metrics API v2 ingest endpoint is different according to your deployment option:
* SaaS: `+https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest+`
* Managed deployments: `+https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest+`
The example below configures metrics export using the `example` environment id:
[source,yaml,indent=0,subs="verbatim",configprops,configblocks] [source,yaml,indent=0,subs="verbatim",configprops,configblocks]
---- ----
management: management:
metrics: metrics:
export: export:
dynatrace: dynatrace:
# uri: "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest" for managed deployments. uri: "https://example.live.dynatrace.com/api/v2/metrics/ingest"
uri: "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest" api-token: "YOUR_TOKEN"
api-token: "YOUR_TOKEN" # should be read from a secure source and not hard-coded.
---- ----
When using the Dynatrace v2 API, the following optional features are available: When using the Dynatrace v2 API, the following optional features are available:
@ -188,13 +194,16 @@ When using the Dynatrace v2 API, the following optional features are available:
* Default dimensions: Specify key-value pairs that are added to all exported metrics. * Default dimensions: Specify key-value pairs that are added to all exported metrics.
If tags with the same key are specified with Micrometer, they overwrite the default dimensions. If tags with the same key are specified with Micrometer, they overwrite the default dimensions.
It is possible to not specify a URI and API token, as shown in the following example.
In this scenario, the local OneAgent endpoint is used:
[source,yaml,indent=0,subs="verbatim",configprops,configblocks] [source,yaml,indent=0,subs="verbatim",configprops,configblocks]
---- ----
management: management:
metrics: metrics:
export: export:
dynatrace: dynatrace:
# specify token and uri or leave blank for OneAgent export # Specify uri and api-token here if not using the local OneAgent endpoint.
v2: v2:
metric-key-prefix: "your.key.prefix" metric-key-prefix: "your.key.prefix"
enrich-with-dynatrace-metadata: true enrich-with-dynatrace-metadata: true
@ -217,9 +226,8 @@ To export metrics to {micrometer-registry-docs}/dynatrace[Dynatrace], your API t
metrics: metrics:
export: export:
dynatrace: dynatrace:
# uri: "https://{your-domain}/e/{your-environment-id}" on managed deployments.
uri: "https://{your-environment-id}.live.dynatrace.com" uri: "https://{your-environment-id}.live.dynatrace.com"
api-token: "YOUR_TOKEN" # should be read from a secure property source api-token: "YOUR_TOKEN"
v1: v1:
device-id: "YOUR_DEVICE_ID" device-id: "YOUR_DEVICE_ID"
---- ----

Loading…
Cancel
Save