Skip to content

Commit 692decd

Browse files
committed
Put the updated documentation in the right place
1 parent 98a3f16 commit 692decd

File tree

1 file changed

+71
-5
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator

1 file changed

+71
-5
lines changed

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

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,87 @@ You can also change the interval at which metrics are sent to Datadog:
147147

148148
[[actuator.metrics.export.dynatrace]]
149149
==== Dynatrace
150-
Dynatrace registry pushes metrics to the configured URI periodically.
150+
151+
Dynatrace offers two metrics ingest APIs, both of which are implemented for {micrometer-registry-docs}/dynatrace[Micrometer]:
152+
153+
===== API v2
154+
155+
The API v2 can be used in two ways:
156+
157+
If a local OneAgent is running on the host, it is enough to set the API version to v2 and metrics will be automatically exported to the https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api/[local OneAgent ingest endpoint], which forwards them to the Dynatrace backend:
158+
159+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
160+
----
161+
management:
162+
metrics:
163+
export:
164+
dynatrace:
165+
api-version: "v2"
166+
----
167+
168+
If no local OneAgent is running, the endpoint of the https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/[Metrics API v2] and an API token are required.
169+
The https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/[API token] must have the "Ingest metrics" (`metrics.ingest`) permission set.
170+
It is recommended to limit scope to only this one permission.
171+
Please ensure that the endpoint URI contains the path (e.g. `/api/v2/metrics/ingest`).
172+
173+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
174+
----
175+
management:
176+
metrics:
177+
export:
178+
dynatrace:
179+
api-version: "v2"
180+
# uri: "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest" for managed deployments.
181+
uri: "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest"
182+
api-token: "YOUR_TOKEN" # should be read from a secure source and not hard-coded.
183+
----
184+
185+
When using the Dynatrace v2 API, the following optional features are available:
186+
187+
* Metric key prefix: Sets a prefix that will be prepended to all exported metric keys.
188+
* Enrich with OneAgent metadata: If a OneAgent is running, enrich metrics with information about the host and the process.
189+
* Default dimensions: Specify key-value pairs that are added to all exported metrics.
190+
If tags with the same key are specified using Micrometer, they overwrite the default dimensions.
191+
192+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
193+
----
194+
management:
195+
metrics:
196+
export:
197+
dynatrace:
198+
# specify token and uri or leave blank for OneAgent export
199+
api-version: "v2"
200+
metric-key-prefix: "your.key.prefix"
201+
enrich-with-one-agent-metadata: true
202+
default-dimensions:
203+
key1: "value1"
204+
key2: "value2"
205+
----
206+
207+
===== API v1 (Legacy)
208+
209+
The Dynatrace API v1 registry pushes metrics to the configured URI periodically using the https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v1/[Timeseries API v1].
210+
For backwards-compatibility with existing setups, `api-version` defaults to `"v1"` but can also be specified explicitly as such.
151211
To export metrics to {micrometer-registry-docs}/dynatrace[Dynatrace], your API token, device ID, and URI must be provided:
212+
For the API v1, the base environment URI needs to be specified, without any path.
213+
The API v1 endpoint path will be added automatically.
152214

153215
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
154216
----
155217
management:
156218
metrics:
157219
export:
158220
dynatrace:
159-
api-token: "YOUR_TOKEN"
160221
device-id: "YOUR_DEVICE_ID"
161-
uri: "YOUR_URI"
222+
# uri: "https://{your-domain}/e/{your-environment-id}" on managed deployments.
223+
uri: "https://{your-environment-id}.live.dynatrace.com"
224+
api-token: "YOUR_TOKEN" # should be read from a secure property source
162225
----
163226

164-
You can also change the interval at which metrics are sent to Dynatrace:
227+
===== Version-independent settings
228+
229+
You can also change the interval at which metrics are sent to Dynatrace (works for both API versions).
230+
The default export interval is `60s`.
165231

166232
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
167233
----
@@ -172,7 +238,7 @@ You can also change the interval at which metrics are sent to Dynatrace:
172238
step: "30s"
173239
----
174240

175-
241+
More information on how to set up the Dynatrace exporter for Micrometer can be found in {micrometer-registry-docs}/dynatrace[the Micrometer documentation].
176242

177243
[[actuator.metrics.export.elastic]]
178244
==== Elastic

0 commit comments

Comments
 (0)