-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add documentation for enabling OTLP traces in APM SDKs #36498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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. <br> | ||||||||||||
| **Default**: `false`<br> | ||||||||||||
| **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. <br> | ||||||||||||
|
|
@@ -100,11 +100,6 @@ Mapped values between `OTEL_TRACES_SAMPLER` & `DD_TRACE_SAMPLE_RATE`:<br> | |||||||||||
| - `always_off`|`0.0` | ||||||||||||
| - `traceidratio`|`${OTEL_TRACES_SAMPLER_ARG}` | ||||||||||||
|
|
||||||||||||
| `OTEL_TRACES_EXPORTER` | ||||||||||||
| : **Datadog convention**: `DD_TRACE_ENABLED=false` <br> | ||||||||||||
| Trace exporter to be used<br> | ||||||||||||
| **Notes**: Only a value of `none` is accepted<br> | ||||||||||||
|
|
||||||||||||
| `OTEL_METRICS_EXPORTER` | ||||||||||||
| : **Description**: Specifies the metrics exporter to be used. <br> | ||||||||||||
| **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`) <br> | ||||||||||||
|
|
@@ -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`. <br> | ||||||||||||
| **Default**: `10000` (10s). | ||||||||||||
|
|
||||||||||||
| ### Traces-specific OTLP configuration | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
|
||||||||||||
| 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`. <br> | ||||||||||||
| **Accepted values**: `grpc`, `http/protobuf`, `http/json`. <br> | ||||||||||||
| **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`. <br> | ||||||||||||
| **Default (gRPC)**: `http://localhost:4317`. <br> | ||||||||||||
| **Default (HTTP)**: `http://localhost:4318/v1/traces`. <br> | ||||||||||||
| **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. <br> | ||||||||||||
| **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. <br> | ||||||||||||
| **Accepted values**: `otlp`, `none`. A value of `none` disables the emission of OTel and Datadog traces. <br> | ||||||||||||
| **Default**: `otlp` | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| **Notes**: The Java SDK requires `DD_TRACE_OTEL_ENABLED=true` for this configuration to take effect.<br> | ||||||||||||
| OTLP export is not available for the Ruby, PHP, or Rust language SDKs. | ||||||||||||
|
Comment on lines
+274
to
+275
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two suggestions here:
|
||||||||||||
|
|
||||||||||||
| ## 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]. | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This uses the order |
||
| | Datadog Tracing | Datadog trace intake | 8126 (TCP) | Datadog Trace Agent | | ||
| | Runtime Metrics | DogStatsD | 8125 (UDP) | DogStatsD Server | | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.