You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify log collection instructions for Datadog Agent (#33203)
* Clarify log collection instructions for Datadog Agent
Updated instructions for log collection with Datadog Agent to clarify trace ID injection and automatic detection of OpenTelemetry keys.
* Clarify trace ID requirements for Datadog Agent
Copy file name to clipboardExpand all lines: content/en/tracing/other_telemetry/connect_logs_and_traces/opentelemetry.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,11 +208,11 @@ This manual approach gives you full control over the log format, ensuring it is
208
208
209
209
#### Collect logs using the Datadog Agent
210
210
211
-
If you collect logs directly with the Datadog Agent (without sending them through the OpenTelemetry Collector), you must ensure the trace IDs in your logs use the Datadog format.
211
+
If you collect logs directly with the Datadog Agent (without sending them through the OpenTelemetry Collector), you must ensure the trace IDs are present in your logs.
212
212
213
-
- **Trace ID format**: The Datadog Agent requires the trace ID to be in the `dd.trace_id` field.
214
-
- If you are using **Datadog's tracing libraries** (like `dd-trace-py`), this is handled for you automatically.
215
-
- If you are generating logs with OpenTelemetry `trace_id` and `span_id` (as shown in the [file-scraping example](#scrape-logs-from-files)), you must use a [Log Processing Rule][5] in Datadog to remap your `trace_id` attribute to `dd.trace_id`.
213
+
- **Trace ID format**: Datadog automatically detects the `dd.trace_id` and `dd.span_id` convention used by Datadog's tracing libraries, as well as the OpenTelemetry standards `trace_id` and `span_id`. See [OpenTelemetry Compatibility docs][6] for details on the standard.
214
+
215
+
<div class="alert alert-info">If your logging instrumentation uses a different attribute name for your trace/span IDs, you must ensure the attribute is added to the <a href="/logs/log_configuration/pipelines/?tab=traceid#preprocessing">Preprocessing for JSON logs</a> configuration so it is recognized as a valid Trace ID.</div>
216
216
217
217
- **Attribute Mapping**: The Datadog Agent does not automatically convert OTel resource attributes (for example, `service.name`) to Datadog's standard tags. You may need to manually remap these attributes in your log processing pipeline to maintain unified service tagging.
218
218
@@ -247,4 +247,5 @@ Click **View Trace in APM** to pivot directly to the full APM trace associated w
0 commit comments