feat(startup-log): report OTLP export status#9517
Conversation
Add three boolean fields to the DATADOG TRACER CONFIGURATION startup log indicating whether the tracer exports each telemetry signal over OTLP: - otlp_traces_export_enabled (OTEL_TRACES_EXPORTER === 'otlp', excluding Test Optimization mode, which keeps test spans on the citestcycle endpoint) - otlp_metrics_export_enabled (DD_METRICS_OTEL_ENABLED) - otlp_logs_export_enabled (DD_LOGS_OTEL_ENABLED) The snake_case keys are chosen for cross-language startup-log consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Overall package sizeSelf size: 7.52 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.2 | 124.41 kB | 440.65 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9517 +/- ##
==========================================
+ Coverage 98.39% 98.45% +0.05%
==========================================
Files 947 947
Lines 128041 128044 +3
Branches 11091 11882 +791
==========================================
+ Hits 125987 126066 +79
+ Misses 2054 1978 -76 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-07-24 01:52:23 Comparing candidate commit 9444363 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 2329 metrics, 28 unstable metrics.
|
What does this PR do?
Adds three boolean fields to the
DATADOG TRACER CONFIGURATIONstartup log that report whether the tracer exports each telemetry signal over OTLP:otlp_traces_export_enabled—truewhenOTEL_TRACES_EXPORTERisotlpand the tracer isn't running in Test Optimization mode (Test Optimization keeps test spans on the citestcycle endpoint instead of OTLP).otlp_metrics_export_enabled— reflectsDD_METRICS_OTEL_ENABLED.otlp_logs_export_enabled— reflectsDD_LOGS_OTEL_ENABLED.The startup-log spec is updated to cover the new fields, the Test Optimization case, and the default all-false state.
Motivation
Part of a cross-tracer effort to surface OTLP export status uniformly. Each dd-trace library emits the same JSON keys in its startup log, so the state reads the same way regardless of language.
Additional Notes
The values mirror the tracer's actual export behavior rather than the raw environment variables: the traces flag applies the same
!isCiVisibilityguard the exporter uses, and the metrics/logs flags read the config values the OTLP pipelines gate on.Related PRs — cross-tracer OTLP startup-log effort