Skip to content

Commit b4b8956

Browse files
committed
Merge pull request #31132 from pirgeo
* pr/31132: Polish 'Update Dynatrace documentation for Micrometer 1.9.0' Update Dynatrace documentation for Micrometer 1.9.0 Closes gh-31132
2 parents 7f584a9 + 0f7fa84 commit b4b8956

File tree

1 file changed

+26
-7
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator

1 file changed

+26
-7
lines changed

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

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ You can also change the interval at which metrics are sent to Datadog:
167167
[[actuator.metrics.export.dynatrace]]
168168
==== Dynatrace
169169
Dynatrace offers two metrics ingest APIs, both of which are implemented for {micrometer-registry-docs}/dynatrace[Micrometer].
170+
You can find the Dynatrace documentation on Micrometer metrics ingest {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/micrometer[here].
170171
Configuration properties in the `v1` namespace apply only when exporting to the {dynatrace-help}/dynatrace-api/environment-api/metric-v1/[Timeseries v1 API].
171172
Configuration properties in the `v2` namespace apply only when exporting to the {dynatrace-help}/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/[Metrics v2 API].
172-
Note that this integration can export only to either the `v1` or `v2` version of the API at a time.
173+
Note that this integration can export only to either the `v1` or `v2` version of the API at a time, with `v2` being preferred.
173174
If the `device-id` (required for v1 but not used in v2) is set in the `v1` namespace, metrics are exported to the `v1` endpoint.
174175
Otherwise, `v2` is assumed.
175176

@@ -179,11 +180,24 @@ Otherwise, `v2` is assumed.
179180
===== v2 API
180181
You can use the v2 API in two ways.
181182

182-
If a local OneAgent is running on the host, metrics are automatically exported to the {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api/[local OneAgent ingest endpoint].
183+
184+
185+
[[actuator.metrics.export.dynatrace.v2-api.auto-config]]
186+
====== Auto-configuration
187+
Dynatrace auto-configuration is available for hosts that are monitored by the OneAgent or by the Dynatrace Operator for Kubernetes.
188+
189+
**Local OneAgent:** If a OneAgent is running on the host, metrics are automatically exported to the {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api/[local OneAgent ingest endpoint].
183190
The ingest endpoint forwards the metrics to the Dynatrace backend.
191+
192+
**Dynatrace Kubernetes Operator:** When running in Kubernetes with the Dynatrace Operator installed, the registry will automatically pick up your endpoint URI and API token from the operator instead.
193+
184194
This is the default behavior and requires no special setup beyond a dependency on `io.micrometer:micrometer-registry-dynatrace`.
185195

186-
If no local OneAgent is running, the endpoint of the {dynatrace-help}/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/[Metrics v2 API] and an API token are required.
196+
197+
198+
[[actuator.metrics.export.dynatrace.v2-api.manual-config]]
199+
====== Manual configuration
200+
If no auto-configuration is available, the endpoint of the {dynatrace-help}/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/[Metrics v2 API] and an API token are required.
187201
The {dynatrace-help}/dynatrace-api/basics/dynatrace-api-authentication/[API token] must have the "`Ingest metrics`" (`metrics.ingest`) permission set.
188202
We recommend limiting the scope of the token to this one permission.
189203
You must ensure that the endpoint URI contains the path (for example, `/api/v2/metrics/ingest`):
@@ -205,15 +219,19 @@ The example below configures metrics export using the `example` environment id:
205219
api-token: "YOUR_TOKEN"
206220
----
207221

208-
When using the Dynatrace v2 API, the following optional features are available:
222+
When using the Dynatrace v2 API, the following optional features are available (more details can be found in the {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/micrometer#dt-configuration-properties[Dynatrace documentation]):
209223

210224
* Metric key prefix: Sets a prefix that is prepended to all exported metric keys.
211225
* Enrich with Dynatrace metadata: If a OneAgent or Dynatrace operator is running, enrich metrics with additional metadata (for example, about the host, process, or pod).
212226
* Default dimensions: Specify key-value pairs that are added to all exported metrics.
213-
If tags with the same key are specified with Micrometer, they overwrite the default dimensions.
227+
If tags with the same key are specified with Micrometer, they overwrite the default dimensions.
228+
* Use Dynatrace Summary instruments: In some cases the Micrometer Dynatrace registry created metrics that were rejected.
229+
In Micrometer 1.9.x, this was fixed by introducing Dynatrace-specific summary instruments.
230+
Setting this toggle to `false` forces Micrometer to fall back to the behavior that was the default before 1.9.x.
231+
It should only be used when encountering problems while migrating from Micrometer 1.8.x to 1.9.x.
214232

215233
It is possible to not specify a URI and API token, as shown in the following example.
216-
In this scenario, the local OneAgent endpoint is used:
234+
In this scenario, the automatically configured endpoint is used:
217235

218236
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
219237
----
@@ -228,6 +246,7 @@ In this scenario, the local OneAgent endpoint is used:
228246
default-dimensions:
229247
key1: "value1"
230248
key2: "value2"
249+
use-dynatrace-summary-instruments: true # (default: true)
231250
----
232251

233252

@@ -269,7 +288,7 @@ The following example sets the export interval to 30 seconds:
269288
step: "30s"
270289
----
271290

272-
You can find more information on how to set up the Dynatrace exporter for Micrometer in {micrometer-registry-docs}/dynatrace[the Micrometer documentation].
291+
You can find more information on how to set up the Dynatrace exporter for Micrometer in the {micrometer-registry-docs}/dynatrace[Micrometer documentation] and the {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/micrometer[Dynatrace documentation].
273292

274293

275294

0 commit comments

Comments
 (0)