Send Datadog Metrics via OpenTelemetry Receiver
Easily ingest your custom DogStatsD metrics into SigNoz using the OpenTelemetry Datadog receiver. Follow these simple steps to set up your OpenTelemetry (OTel) Agent and configure your Datadog Agent for seamless metric ingestion.
Prerequisites
Before you begin, ensure you have the following:
- OpenTelemetry Collector/Agent installed and running.
- Datadog Agent installed.
- Access to modify configuration files and environment variables.
Step 1: Configure the Datadog Receiver in OpenTelemetry
Set up the Datadog receiver in your OpenTelemetry Collector to accept DogStatsD metrics.
- Edit the OpenTelemetry Configuration: Add the datadog receiver to your OpenTelemetry Collector configuration file (e.g., otel-collector-config.yaml):
receivers:
datadog:
endpoint: <HOST>:<PORT>
read_timeout: 60s
- Replace Placeholders: •
<HOST>
: The hostname where the receiver will listen (e.g., localhost). •<PORT>
: The port number for the receiver (e.g., 8125). Example:
receivers:
datadog:
endpoint: localhost:8125
read_timeout: 60s
Step 2: Update the Metrics Pipeline
Integrate the Datadog receiver into your metrics pipeline.
- Modify the Metrics Pipeline Section: Add the datadog receiver alongside any existing receivers like otlp.
pipelines:
metrics:
receivers: [datadog, otlp]
processors: [batch]
exporters: [otlp]
This configuration allows the OpenTelemetry Collector to process metrics from both Datadog and OTLP sources.
Step 3: Configure the Datadog Agent
Set up your Datadog Agent to forward metrics to the Datadog receiver.
Option A: Forward to Both SigNoz and Datadog
If you want to send metrics to both SigNoz and Datadog:
- Set Environment Variable: Add the following environment variable to your Datadog Agent installation:
DD_ADDITIONAL_ENDPOINTS='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["signoz"]}'
- OR Update the Configuration File:
additional_endpoints: http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>
- Replace Placeholders: •
<DATADOG_RECEIVER_HOST>
: Hostname where the OTel receiver is running (e.g., localhost). •<DATADOG_RECEIVER_PORT>
: Port number for the OTel receiver (e.g., 8125). Example:
DD_ADDITIONAL_ENDPOINTS='{"http://localhost:8125": ["signoz"]}'
Option B: Forward Only to SigNoz
If you prefer sending metrics exclusively to SigNoz:
- Set Environment Variable:
DD_DD_URL='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["datadog-receiver"]}'
- OR Update the Configuration File:
dd_url: http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>
- Replace Placeholders: •
<DATADOG_RECEIVER_HOST>
: Hostname where the OTel receiver is running (e.g., localhost). •<DATADOG_RECEIVER_PORT>
: Port number for the OTel receiver (e.g., 8125). Example:
dd_url: http://localhost:8125
Step 4: Restart Agents
After making the configuration changes:
- Restart the Datadog Agent:
- Restart the OpenTelemetry Collector/Agent:
Additional Resources
- Datadog Receiver Configuration Documentation
- OpenTelemetry Collector Configuration Guide
- Datadog Agent Documentation
By following these steps, you can efficiently ingest DogStatsD metrics into your OpenTelemetry setup using the Datadog receiver, while maintaining flexibility to forward metrics to multiple destinations.