AWS Distro for OpenTelemetry

Dynatrace Exporter

Dynatrace Exporter

Dynatrace supports native OpenTelemetry protocol (OTLP) ingest, so users of the AWS Distro for OpenTelemetry (ADOT) can send traces, metrics and logs directly to Dynatrace without the need for additional plugins or exporters. See the OTLP documentation for configuration examples. More information on using the collector with Dynatrace can be found in the Dynatrace documentation.

The proprietary Dynatrace OpenTelemetry metrics exporter is deprecated in favor of exporting via OTLP. The rest of this page covers the documentation of this deprecated exporter.

Dynatrace OpenTelemetry metrics exporter (deprecated)

Dynatrace supports native OpenTelemetry protocol (OTLP) metrics ingest. Since the OpenTelemetry Collector offers an OTLP exporter, the Dynatrace OpenTelemetry metrics exporter is now obsolete and no longer recommended.

Check out the migration guide on the Dynatrace documentation to learn how to migrate to the OTLP HTTP exporter. See the OTLP documentation for a configuration example.

Requirements

Given an environment ID abc12345 on Dynatrace SaaS, for example, the metrics ingest endpoint would be https://abc12345.live.dynatrace.com/api/v2/metrics/ingest.

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.

Configuring the Dynatrace Metrics Exporter

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:4317
6exporters:
7 dynatrace:
8 endpoint: https://ab12345.live.dynatrace.com/api/v2/metrics/ingest
9 api_token: <api token must have metrics.write permission>
10service:
11 extensions:
12 pipelines:
13 metrics:
14 receivers: [otlp]
15 exporters: [dynatrace]

Set Dynatrace Metrics Exporter Configurations

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:4317
6exporters:
7 dynatrace:
8 endpoint: https://ab12345.live.dynatrace.com/api/v2/metrics/ingest
9 api_token: <api token must have metrics.write permission>
10 tags:
11 - tag1=value1
12 prefix: my_prefix
13 headers:
14 - header1: value1
15 read_buffer_size: 4000
16 write_buffer_size: 4000
17 timeout: 10s
18 insecure_skip_verify: false
19 retry_on_failure:
20 enabled: true
21 initial_interval: 5s
22 max_interval: 30s
23 max_elapsed_time: 120s
24 sending_queue:
25 enabled: true
26 num_consumers: 10
27 queue_size: 5000
28service:
29 extensions:
30 pipelines:
31 metrics:
32 receivers: [otlp]
33 exporters: [dynatrace]

tags (Optional)

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 (Optional)

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 my_service.request_count.

headers (Optional)

Additional headers to be included with every outgoing http request.

read_buffer_size (Optional)

Defines the buffer size to allocate to the HTTP client for reading the response.

Default: 4096

write_buffer_size (Optional)

Defines the buffer size to allocate to the HTTP client for writing the payload

Default: 4096

timeout (Optional)

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.

https://golang.org/pkg/net/http/#Client

Default: 0

insecure_skip_verify (Optional)

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.

Default: false

retry_on_failure.enabled (Optional)

Default: true

retry_on_failure.initial_interval (Optional)

Time to wait after the first failure before retrying; ignored if enabled is false.

Default: 5s

retry_on_failure.max_interval (Optional)

The upper bound on backoff; ignored if enabled is false

Default: 30s

retry_on_failure.max_elapsed_time (Optional)

The maximum amount of time spent trying to send a batch; ignored if enabled is false.

Default: 120s

sending_queue.enabled (Optional)

Default: true

sending_queue.num_consumers (Optional)

Number of consumers that dequeue batches; ignored if enabled is false.

Default: 10

sending_queue.queue_size (Optional)

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_seconds is the number of seconds to buffer in case of a backend outage
  • requests_per_second is the average number of requests per seconds.

Default: 5000