Datadog provides monitoring and insights into infrastructure and application performance across your entire stack. The AWS Distro for Open Telemetry includes the Datadog exporter, which takes OpenTelemetry data (metrics and traces) collected by the AWS OTel Collector and forwards it on to Datadog. From there, you can use Datadog tools and dashboards to analyze and solve performance problems in your distributed apps.
- Download the AWS OTel Collector.
- Deploy the AWS OTel Collector.
- Get a copy of your Datadog API key. If you don't already have a Datadog account, sign up for a Datadog Free Trial.
Configure the AWS OTel collector to send metrics and traces to Datadog by adding a
datadog exporter to your OpenTelemetry configuration YAML file along with your Datadog API key:
1datadog:2 api:3 key: "<API key>"
To send the data to the Datadog EU site, also set the
1datadog:2 api:3 key: "<API key>"4 site: datadoghq.eu
For trace data: Include a batch processor configured with a required
timeout setting of
10s (10 seconds). This sends batches of trace data to Datadog every 10 seconds, ensuring efficient and accurate trace metrics processing.
1processors:2 batch:3 timeout: 10s
On each OpenTelemetry-instrumented application, set the resource attributes
service.version using the language's SDK. As a fall-back, you can also configure hostname (optionally), environment, service name, and service version at the collector level for unified service tagging by following the example configuration file. If you don't specify the hostname explicitly, the exporter attempts to get an automatic default by checking the following sources in order, falling back to the next one if the current one is unavailable or invalid:
- Manually set the hostname in configuration
- EC2 non-default hostname (if in an EC2 instance)
- EC2 instance id (if in an EC2 instance)
- Fully qualified domain name
- Operating system hostname
Finally, add a
datadog exporter pipeline to your
otel-collector-configuration.yml file. This shows a
1service:2 pipelines:3 traces:4 receivers: [otlp]5 processors: [batch]6 exporters: [datadog/api]
Here is an example configuration for collecting trace data using the
otlp receiver, a batch processor, the
datadog exporter with resource attributes and tags, and a trace pipeline configured with an
batch processor, and
1receivers:2 otlp:34processors:5 batch:6 timeout: 10s78exporters:9 datadog/api:10 hostname: i-0e123a456a123456a11 env: prod12 service: web-store13 version: 7.1.01415 tags:16 - geo.country:fr1718 api:19 key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"20 site: datadoghq.eu2122service:23 pipelines:24 traces:25 receivers: [otlp]26 processors: [batch]27 exporters: [datadog/api]
Here is an example configuration for collecting metrics data:
1receivers:2 otlp:34exporters:5 datadog/api:6 hostname: i-0e123a456a123456a7 env: prod89 tags:10 - geo.country:fr1112 api:13 key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"14 site: datadoghq.eu1516service:17 pipelines:18 metrics:19 receivers: [otlp]20 exporters: [datadog/api]
Supply the relative path to this configuration file when you start the collector by passing it in using the
--config=<path/to/configuration_file> command line argument. For examples of supplying a configuration file, see the AWS OpenTelemetry Collector documentation for your target platform.
For additional information about the Datadog exporter and environment specific onboarding instructions, visit the Datadog OpenTelemetry Collector documentation or the
open-telemetry Github repository.
Need help with the Datadog exporter? Contact Datadog support.