Skip to content

Commit

Permalink
[Datadog collection] Update instructions for trace forwarding (#1911)
Browse files Browse the repository at this point in the history
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
(cherry picked from commit 4d18fc4)
  • Loading branch information
ptodev authored and grafanabot committed Oct 30, 2024
1 parent bc8c5cc commit 63bc9ff
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions docs/sources/collect/datadog-traces-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ You can configure {{< param "PRODUCT_NAME" >}} to collect [Datadog][] traces and

This topic describes how to:

* Configure metrics and traces delivery.
* Configure {{< param "PRODUCT_NAME" >}} to send traces and metrics.
* Configure the {{< param "PRODUCT_NAME" >}} Datadog Receiver.
* Configure the Datadog Agent to forward metrics to the {{< param "PRODUCT_NAME" >}} Datadog Receiver.
* Configure the Datadog Agent to forward traces and metrics to the {{< param "PRODUCT_NAME" >}} Datadog Receiver.

## Before you begin

* Ensure that at least one instance of the [Datadog Agent][] is collecting metrics and/or traces.
* Identify where you will write collected metrics.
Metrics can be written to [Prometheus]() or any other OTel-compatible database such as Grafana Mimir, Grafana Cloud, or Grafana Enterprise Metrics.
* Identify where you will write the collected telemetry.
Metrics can be written to [Prometheus]() or any other OpenTelemetry-compatible database such as Grafana Mimir, Grafana Cloud, or Grafana Enterprise Metrics.
Traces can be written to Grafana Tempo, Grafana Cloud, or Grafana Enterprise Traces.
* Be familiar with the concept of [Components][] in {{< param "PRODUCT_NAME" >}}.

## Configure metrics delivery
## Configure {{% param "PRODUCT_NAME" %}} to send traces and metrics

Before components can collect Datadog metrics, you must have a component responsible for writing those metrics somewhere.
Before components can collect Datadog telemetry signals, you must have a component responsible for writing this telemetry somewhere.

The [otelcol.exporter.otlp][] component is responsible for delivering OTLP data to OTel-compatible endpoints.
The [otelcol.exporter.otlp][] component is responsible for delivering OTLP data to OpenTelemetry-compatible endpoints.

1. Add the following `otelcol.exporter.otlp` component to your configuration file.

Expand All @@ -45,7 +45,7 @@ The [otelcol.exporter.otlp][] component is responsible for delivering OTLP data

Replace the following:

- _`<OTLP_ENDPOINT_URL>`_: The full URL of the OTel-compatible endpoint where metrics and traces will be sent, such as `https://otlp-gateway-prod-eu-west-2.grafana.net/otlp`.
- _`<OTLP_ENDPOINT_URL>`_: The full URL of the OpenTelemetry-compatible endpoint where metrics and traces will be sent, such as `https://otlp-gateway-prod-eu-west-2.grafana.net/otlp`.

1. If your endpoint requires basic authentication, paste the following inside the `endpoint` block.

Expand All @@ -61,7 +61,7 @@ The [otelcol.exporter.otlp][] component is responsible for delivering OTLP data
- _`<USERNAME>`_: The basic authentication username.
- _`<PASSWORD>`_: The basic authentication password or API key.

## Configure Datadog Receiver
## Configure the {{% param "PRODUCT_NAME" %}} Datadog Receiver

1. Add the following `otelcol.processor.batch` component to your configuration file.

Expand Down Expand Up @@ -122,18 +122,21 @@ The [otelcol.exporter.otlp][] component is responsible for delivering OTLP data
- _`<USERNAME>`_: The basic authentication username.
- _`<PASSWORD>`_: The basic authentication password or API key.

## Configure Datadog Agent to forward metrics to the Datadog Receiver
## Configure Datadog Agent to forward telemetry to the {{% param "PRODUCT_NAME" %}} Datadog Receiver

You can set up your Datadog Agent to forward Datadog metrics simultaneously to {{< param "PRODUCT_NAME" >}} and Datadog.
You can set up your Datadog Agent to forward Datadog metrics and traces simultaneously to {{< param "PRODUCT_NAME" >}} and Datadog.

We recommend this approach for current Datadog users who want to try using {{< param "PRODUCT_NAME" >}}.

1. Add the following environment variable to your datadog-agent installation.
1. Add the following environment variables to your Datadog-agent installation.

```bash
DD_ADDITIONAL_ENDPOINTS='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["datadog-receiver"]}'
DD_APM_ADDITIONAL_ENDPOINTS='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["datadog-receiver"]}'
```

`DD_ADDITIONAL_ENDPOINTS` is used for forwarding metrics, whereas `DD_APM_ADDITIONAL_ENDPOINTS` is for traces.

Replace the following:

- _`<DATADOG_RECEIVER_HOST>`_: The hostname where the {{< param "PRODUCT_NAME" >}} receiver is found.
Expand All @@ -154,9 +157,10 @@ Or by setting an environment variable:
DD_DD_URL='{"http://<DATADOG_RECEIVER_HOST>:<DATADOG_RECEIVER_PORT>": ["datadog-receiver"]}'
```

## Run {{% param "PRODUCT_NAME" %}} with the Datadog Receiver
## Run {{% param "PRODUCT_NAME" %}}

Some of the components used here are experimental. In order to run them, you need to start {{< param "PRODUCT_NAME" >}} with additional command line flags:
The `otelcol.receiver.datadog` component is experimental.
To use this component, you need to start {{< param "PRODUCT_NAME" >}} with additional command line flags:

```bash
alloy run config.alloy --stability.level=experimental
Expand Down

0 comments on commit 63bc9ff

Please sign in to comment.