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. For an overview of all available connection methods, see Connecting to Datadog.
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.
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.