diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc index 4de7eb25830..3f4b333bd0c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc +++ b/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. 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] ---- management: metrics: export: dynatrace: - # uri: "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest" for managed deployments. - uri: "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest" - api-token: "YOUR_TOKEN" # should be read from a secure source and not hard-coded. + uri: "https://example.live.dynatrace.com/api/v2/metrics/ingest" + api-token: "YOUR_TOKEN" ---- 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. 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] ---- management: metrics: export: 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: metric-key-prefix: "your.key.prefix" enrich-with-dynatrace-metadata: true @@ -217,9 +226,8 @@ To export metrics to {micrometer-registry-docs}/dynatrace[Dynatrace], your API t metrics: export: dynatrace: - # uri: "https://{your-domain}/e/{your-environment-id}" on managed deployments. 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: device-id: "YOUR_DEVICE_ID" ----