From 2d34cff902379ead5d10ad9f37358378fead7c17 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 30 Sep 2021 10:08:15 +0200 Subject: [PATCH] Polish "Improve Dynatrace examples description in reference guide" See gh-27502 --- .../src/docs/asciidoc/actuator/metrics.adoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 a69b639172..3f4b333bd0 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,10 +170,12 @@ 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 URLs of the Metrics API v2 ingest endpoint are: +The URL of the Metrics API v2 ingest endpoint is different according to your deployment option: -- `+https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest+` for SaaS and -- `+https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest+` for Managed Deployments +* 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] ---- @@ -181,7 +183,7 @@ The URLs of the Metrics API v2 ingest endpoint are: metrics: export: dynatrace: - uri: "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest" + uri: "https://example.live.dynatrace.com/api/v2/metrics/ingest" api-token: "YOUR_TOKEN" ---- @@ -192,8 +194,8 @@ 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. -In the example below URI and API token are not specified, therefore the local OneAgent endpoint is used. -It is also possible to explicitly use the `uri` and `api-token` properties as shown in the examples above. +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] ----