feat: report OTLP export status in startup log#19265
Conversation
|
BenchmarksBenchmark execution time: 2026-07-24 21:58:29 Comparing candidate commit 0025fca in PR branch Found 0 performance improvements and 5 performance regressions! Performance is the same for 612 metrics, 10 unstable metrics. scenario:iastaspects-lstrip_aspect
scenario:iastaspects-translate_aspect
scenario:iastaspectsospath-ospathbasename_aspect
scenario:span-start
scenario:telemetryaddmetric-1-count-metric-1-times
|
Add three boolean fields to the tracer's startup diagnostic log
("DATADOG TRACER CONFIGURATION") indicating whether each telemetry
signal is exported over OTLP:
- otlp_traces_export_enabled: reflects agent_config.trace_otlp_export_enabled
(opt-in via OTEL_TRACES_EXPORTER=otlp; export is routed through
libdatadog's native OTLP trace exporter)
- otlp_metrics_export_enabled: reflects config._otel_metrics_enabled
- otlp_logs_export_enabled: reflects config._otel_logs_enabled
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
e09dd49 to
0025fca
Compare
Codeowners resolved as |
Circular import analysis🚨 New circular imports detected 🚨15 new circular import(s) have been introduced by this PR: Show new cycles (showing 5 of 15 shortest)
Please consider refactoring your changes in accordance to the Separation of Concerns principle.
|
Description
Adds three boolean fields to the tracer's startup diagnostic log ("DATADOG TRACER CONFIGURATION"), emitted from
collect()inddtrace/internal/debug.py:otlp_traces_export_enabled: reflectsagent_config.trace_otlp_export_enabled(OTLP trace export, opt-in viaOTEL_TRACES_EXPORTER=otlp)otlp_metrics_export_enabled: reflectsconfig._otel_metrics_enabledotlp_logs_export_enabled: reflectsconfig._otel_logs_enabledThis makes the OTLP export configuration visible in the startup log, which helps with support and debugging. It is part of a cross-tracer effort, so the JSON keys are identical across the dd-trace-* libraries.
Testing
test_standard_tagsasserts the three keys are present and boolean.test_otlp_export_enabled_fields_defaultruns in a subprocess with the OTLP-related env cleared and asserts all three default toFalse.test_otlp_export_enabled_fields_setruns in a subprocess withOTEL_TRACES_EXPORTER=otlpand the metrics/logs flags enabled, and asserts all three reportTrue.Risks
None. The change only adds fields to an existing diagnostic log. No existing fields or behavior change.
Additional Notes
No release note is needed: this change only adds fields to the tracer's internal startup diagnostic log and does not change customer-facing behavior. The PR carries the
changelog/no-changeloglabel.Related PRs — cross-tracer OTLP startup-log effort