Skip to content

Commit ff4e6f7

Browse files
committed
Merge branch '2.7.x'
Closes gh-31339
2 parents 2155aac + b4b8956 commit ff4e6f7

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
@@ -168,9 +168,10 @@ You can also change the interval at which metrics are sent to Datadog:
168168
[[actuator.metrics.export.dynatrace]]
169169
==== Dynatrace
170170
Dynatrace offers two metrics ingest APIs, both of which are implemented for {micrometer-registry-docs}/dynatrace[Micrometer].
171+
You can find the Dynatrace documentation on Micrometer metrics ingest {dynatrace-help}/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/micrometer[here].
171172
Configuration properties in the `v1` namespace apply only when exporting to the {dynatrace-help}/dynatrace-api/environment-api/metric-v1/[Timeseries v1 API].
172173
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].
173-
Note that this integration can export only to either the `v1` or `v2` version of the API at a time.
174+
Note that this integration can export only to either the `v1` or `v2` version of the API at a time, with `v2` being preferred.
174175
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.
175176
Otherwise, `v2` is assumed.
176177

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

183-
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].
184+
185+
186+
[[actuator.metrics.export.dynatrace.v2-api.auto-config]]
187+
====== Auto-configuration
188+
Dynatrace auto-configuration is available for hosts that are monitored by the OneAgent or by the Dynatrace Operator for Kubernetes.
189+
190+
**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].
184191
The ingest endpoint forwards the metrics to the Dynatrace backend.
192+
193+
**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.
194+
185195
This is the default behavior and requires no special setup beyond a dependency on `io.micrometer:micrometer-registry-dynatrace`.
186196

187-
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.
197+
198+
199+
[[actuator.metrics.export.dynatrace.v2-api.manual-config]]
200+
====== Manual configuration
201+
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.
188202
The {dynatrace-help}/dynatrace-api/basics/dynatrace-api-authentication/[API token] must have the "`Ingest metrics`" (`metrics.ingest`) permission set.
189203
We recommend limiting the scope of the token to this one permission.
190204
You must ensure that the endpoint URI contains the path (for example, `/api/v2/metrics/ingest`):
@@ -206,15 +220,19 @@ The example below configures metrics export using the `example` environment id:
206220
api-token: "YOUR_TOKEN"
207221
----
208222

209-
When using the Dynatrace v2 API, the following optional features are available:
223+
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]):
210224

211225
* Metric key prefix: Sets a prefix that is prepended to all exported metric keys.
212226
* 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).
213227
* Default dimensions: Specify key-value pairs that are added to all exported metrics.
214-
If tags with the same key are specified with Micrometer, they overwrite the default dimensions.
228+
If tags with the same key are specified with Micrometer, they overwrite the default dimensions.
229+
* Use Dynatrace Summary instruments: In some cases the Micrometer Dynatrace registry created metrics that were rejected.
230+
In Micrometer 1.9.x, this was fixed by introducing Dynatrace-specific summary instruments.
231+
Setting this toggle to `false` forces Micrometer to fall back to the behavior that was the default before 1.9.x.
232+
It should only be used when encountering problems while migrating from Micrometer 1.8.x to 1.9.x.
215233

216234
It is possible to not specify a URI and API token, as shown in the following example.
217-
In this scenario, the local OneAgent endpoint is used:
235+
In this scenario, the automatically configured endpoint is used:
218236

219237
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
220238
----
@@ -229,6 +247,7 @@ In this scenario, the local OneAgent endpoint is used:
229247
default-dimensions:
230248
key1: "value1"
231249
key2: "value2"
250+
use-dynatrace-summary-instruments: true # (default: true)
232251
----
233252

234253

@@ -270,7 +289,7 @@ The following example sets the export interval to 30 seconds:
270289
step: "30s"
271290
----
272291

273-
You can find more information on how to set up the Dynatrace exporter for Micrometer in {micrometer-registry-docs}/dynatrace[the Micrometer documentation].
292+
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].
274293

275294

276295

0 commit comments

Comments
 (0)