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.

  1. 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
  1. 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.

  1. 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:

  1. Set Environment Variable: Add the following environment variable to your Datadog Agent installation:
DD_ADDITIONAL_ENDPOINTS='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["signoz"]}'
  1. OR Update the Configuration File:
additional_endpoints: http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>
  1. 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:

  1. Set Environment Variable:
DD_DD_URL='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["datadog-receiver"]}'
  1. OR Update the Configuration File:
dd_url: http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>
  1. 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:

  1. Restart the Datadog Agent:
  2. Restart the OpenTelemetry Collector/Agent:

Additional Resources

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.

Was this page helpful?