From 3e31aa8b278b5d8fee0587c9f1cf56b00e10c60f Mon Sep 17 00:00:00 2001 From: Zach Montoya Date: Tue, 5 May 2026 16:05:56 -0700 Subject: [PATCH] Add documentation for enabling OTLP traces --- .../config/environment_variable_support.md | 38 +++++++++++++++---- .../otel-network-requirements.en.md | 2 +- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/content/en/opentelemetry/config/environment_variable_support.md b/content/en/opentelemetry/config/environment_variable_support.md index f1e8375ce56..2d86ceb03f2 100644 --- a/content/en/opentelemetry/config/environment_variable_support.md +++ b/content/en/opentelemetry/config/environment_variable_support.md @@ -48,12 +48,12 @@ The precedence rules on this page describe how *Datadog SDKs* resolve configurat **Note**: Even when `DD_METRICS_OTEL_ENABLED=true`, standard Runtime Metrics are still emitted through DogStatsD. ## Datadog SDK configuration -These environment variables enable the Datadog SDK to ingest OpenTelemetry Metrics and Logs API data. For guides on how to instrument your application, see the [language-specific instrumentation documentation][14]. +These environment variables enable the Datadog SDK to ingest OpenTelemetry Traces, Metrics, and Logs API data. For guides on how to instrument your application, see the [language-specific instrumentation documentation][14]. `DD_TRACE_OTEL_ENABLED` : **Description**: Enables the Datadog SDK's OpenTelemetry interoperability for traces.
**Default**: `false`
-**Notes**: The default is `true` in the Java SDK. +**Notes**: This configuration only enables the OpenTelemetry Tracing API. See `OTEL_TRACES_EXPORTER` to emit traces using OTLP. `DD_METRICS_OTEL_ENABLED` : **Description**: Enables the automatic instrumentation components of the Datadog SDK to collect and emit metrics generated by the OTel Metrics API.
@@ -100,11 +100,6 @@ Mapped values between `OTEL_TRACES_SAMPLER` & `DD_TRACE_SAMPLE_RATE`:
- `always_off`|`0.0` - `traceidratio`|`${OTEL_TRACES_SAMPLER_ARG}` -`OTEL_TRACES_EXPORTER` -: **Datadog convention**: `DD_TRACE_ENABLED=false`
-Trace exporter to be used
-**Notes**: Only a value of `none` is accepted
- `OTEL_METRICS_EXPORTER` : **Description**: Specifies the metrics exporter to be used.
**Notes**: The only accepted values are `otlp` and `none`. A value of `none` disables the emission of OTel metrics, as well as APM runtime metrics (equivalent to `DD_RUNTIME_METRICS_ENABLED=false`)
@@ -205,6 +200,24 @@ For more details on the official specification for these variables, see the [Ope : **Description**: Specifies the timeout (in milliseconds) for a single outgoing OTLP logs request. Takes precedence over the general `OTEL_EXPORTER_OTLP_TIMEOUT`.
**Default**: `10000` (10s). +### Traces-specific OTLP configuration + +For more details on the official specification for these variables, see the [OpenTelemetry Protocol Exporter documentation][13]. + +`OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` +: **Description**: Specifies the OTLP transport protocol for traces. Takes precedence over `OTEL_EXPORTER_OTLP_PROTOCOL`.
+**Accepted values**: `grpc`, `http/protobuf`, `http/json`.
+**Default**: SDK-dependent. The Datadog SDK aims to match the default protocol of the corresponding official OpenTelemetry SDK for that language. + +`OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` +: **Description**: Specifies the URL for sending OTLP trace data. Takes precedence over `OTEL_EXPORTER_OTLP_ENDPOINT`.
+**Default (gRPC)**: `http://localhost:4317`.
+**Default (HTTP)**: `http://localhost:4318/v1/traces`.
+**Notes**: For HTTP protocols, the SDK automatically appends `/v1/traces` if the general `OTEL_EXPORTER_OTLP_ENDPOINT` is used as a fallback. + +`OTEL_EXPORTER_OTLP_TRACES_HEADERS` +: **Description**: Specifies a comma-separated list of key-value pairs to be used as headers on outgoing OTLP trace requests (for example, `api-key=key,other-config=value`). Takes precedence over the general `OTEL_EXPORTER_OTLP_HEADERS`. + ## OpenTelemetry Metrics SDK configuration Datadog SDKs support the following OpenTelemetry Metrics SDK options. @@ -250,6 +263,17 @@ Datadog SDKs support the following OpenTelemetry Logs SDK options. : **Description**: The maximum number of log records in a single OTLP payload.
**Default**: `512` +## OpenTelemetry Traces SDK configuration + +Datadog SDKs support the following OpenTelemetry Traces SDK options. + +`OTEL_TRACES_EXPORTER` +: **Description**: Specifies the trace exporter to be used.
+**Accepted values**: `otlp`, `none`. A value of `none` disables the emission of OTel and Datadog traces.
+**Default**: `otlp` +**Notes**: The Java SDK requires `DD_TRACE_OTEL_ENABLED=true` for this configuration to take effect.
+OTLP export is not available for the Ruby, PHP, or Rust language SDKs. + ## Java-specific configuration Datadog SDKs support the following Java-specific OpenTelemetry configuration options. For more information, see the [OpenTelemetry documentation on Java agent configuration][10]. diff --git a/layouts/shortcodes/otel-network-requirements.en.md b/layouts/shortcodes/otel-network-requirements.en.md index 61f498dac98..da5982db413 100644 --- a/layouts/shortcodes/otel-network-requirements.en.md +++ b/layouts/shortcodes/otel-network-requirements.en.md @@ -2,6 +2,6 @@ When using the Datadog SDK with OpenTelemetry API support, telemetry is routed t | Signal Source | Protocol | Port | Destination Component | |---------------|----------|------|----------------------| -| OTel Metrics and Logs API | OTLP (gRPC/HTTP) | 4317 / 4318 | Datadog Agent OTLP Receiver or DDOT Collector | +| OTel Metrics, Logs, and Traces | OTLP (gRPC/HTTP) | 4317 / 4318 | Datadog Agent OTLP Receiver or DDOT Collector | | Datadog Tracing | Datadog trace intake | 8126 (TCP) | Datadog Trace Agent | | Runtime Metrics | DogStatsD | 8125 (UDP) | DogStatsD Server |