The Dynatrace metrics exporter exports metrics to the metrics API v2 using the metrics ingestion protocol. This enables Dynatrace to receive metrics collected by the OpenTelemetry Collector. Dynatrace is an all-in-one software intelligence platform delivering continuous, automatic discovery and observability across your full stack. The Dynatrace Open Source Engineering team developed this exporter for metrics in the OpenTelemetry Collector. This exporter allows metrics collected by the OpenTelemetry Collector to be stored, viewed, and analyzed in Dynatrace.
Given an environment ID
abc12345 on Dynatrace SaaS, for example, the metrics ingest endpoint would be
The requests sent to Dynatrace are authenticated using an API token. Creating an API token for your Dynatrace environment is described in the Dynatrace API documentation. The only access scope required for exporting metrics is the Ingest metrics (
metrics.ingest) scope listed in the API v2 section. It is recommended to limit the token's scope to only that one.
To enable the Dynatrace metrics exporter, write the name under exporter section in the OpenTelemetry config file (
local/config.yaml) and add the
dynatrace exporter to your metrics pipeline.
1receivers:2 otlp:3 protocols:4 grpc:5 endpoint: 0.0.0.0:556806exporters:7 dynatrace:8 endpoint: https://ab12345.live.dynatrace.com/api/v2/metrics/ingest9 api_token: <api token must have metrics.write permission>10service:11 extensions:12 pipelines:13 metrics:14 receivers: [otlp]15 exporters: [dynatrace]
Users can configure the HTTP client, TLS, queueing, retry, and timeout settings.
1receivers:2 otlp:3 protocols:4 grpc:5 endpoint: 0.0.0.0:556806exporters:7 dynatrace:8 endpoint: https://ab12345.live.dynatrace.com/api/v2/metrics/ingest9 api_token: <api token must have metrics.write permission>10 tags:11 - tag1=value112 prefix: my_prefix13 headers:14 - header1: value115 read_buffer_size: 400016 write_buffer_size: 400017 timeout: 10s18 insecure_skip_verify: false19 retry_on_failure:20 enabled: true21 initial_interval: 5s22 max_interval: 30s23 max_elapsed_time: 120s24 sending_queue:25 enabled: true26 num_consumers: 1027 queue_size: 500028service:29 extensions:30 pipelines:31 metrics:32 receivers: [otlp]33 exporters: [dynatrace]
Tags are included as dimensions on all exported metrics.
Tags must be in the
key=value dimension format specified by the metrics ingestion protocol.
Prefix is a string which will be used as the first part of a dot-separated metric key.
For example, if a metric with name
request_count is prefixed with
my_service, the resulting
metric key is
Additional headers to be included with every outgoing http request.
Defines the buffer size to allocate to the HTTP client for reading the response.
Defines the buffer size to allocate to the HTTP client for writing the payload
Timeout specifies a time limit for requests made by this Client. The timeout includes connection time, any redirects, and reading the response body. The timer remains running after Get, Head, Post, or Do return and will interrupt reading of the Response.Body.
Additionally you can configure TLS to be enabled but skip verifying the server's certificate chain. This cannot be combined with insecure since insecure won't use TLS at all.
Time to wait after the first failure before retrying; ignored if enabled is false.
The upper bound on backoff; ignored if enabled is false
The maximum amount of time spent trying to send a batch; ignored if enabled is false.
Number of consumers that dequeue batches; ignored if enabled is false.
Maximum number of batches kept in memory before data; ignored if enabled is false;
User should calculate this as
num_seconds * requests_per_second where:
num_secondsis the number of seconds to buffer in case of a backend outage
requests_per_secondis the average number of requests per seconds.