Datadog configuration of OTLP exporter
Configure the OTLP metrics exporter for Datadog
This guide walks through configuring the Apollo Router to send metrics to Datadog via the Datadog Agent. This metrics exporter is a configuration of the OTLP exporter to use with Datadog.
For general metrics configuration, refer to Router Metrics Configuration. For router instrumentation with Datadog-specific attributes, see the Router Instrumentation guide.
Connection methods
Datadog supports multiple methods for ingesting OpenTelemetry data:
Datadog OpenTelemetry collector (DDOT) - Datadog's distribution of the OpenTelemetry Collector
OpenTelemetry collector - Vendor-neutral telemetry pipeline with advanced processing (guide available)
Datadog agent - Direct connection with native Datadog features (this guide)
Agentless - Direct OTLP ingestion to Datadog
For a comprehensive overview of all OpenTelemetry setup options with Datadog, see Datadog's OpenTelemetry setup documentation.
Configuration
To export metrics to Datadog, you must configure both the router to send traces to the Datadog agent and the Datadog agent to accept OpenTelemetry Protocol (OTLP) metrics.
Router configuration
You should enable the OTLP exporter and set both temporality: delta and endpoint: <datadog-agent-endpoint>. For example:
1telemetry:
2 exporters:
3 metrics:
4 otlp:
5 enabled: true
6 # Temporality MUST be set to delta. Failure to do this will result in incorrect metrics.
7 temporality: delta
8 # Optional endpoint, either 'default' or a URL (Defaults to http://127.0.0.1:4317)
9 endpoint: "${env.DATADOG_AGENT_HOST}:4317"temporality: delta, otherwise the router generates incorrect metrics.Datadog agent configuration
To configure the Datadog agent, add OTLP configuration (otlp_config) to your datadog.yaml. For example:
1otlp_config:
2 receiver:
3 protocols:
4 grpc:
5 endpoint: <dd-agent-ip>:4317For more details about Datadog configuration, see Datadog's docs on Agent configuration.