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.48 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 |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 430341e | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9517 +/- ##
========================================
Coverage 98.45% 98.45%
========================================
Files 948 948
Lines 128608 128611 +3
Branches 11098 10853 -245
========================================
+ Hits 126620 126623 +3
Misses 1988 1988
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-27 20:04:55 Comparing candidate commit 430341e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2311 metrics, 47 unstable metrics.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9444363f82
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ag tests The `otlp export flags` cleanup only cleared OTEL_TRACES_EXPORTER, leaving OTEL_METRICS_EXPORTER and OTEL_LOGS_EXPORTER set. In shells that export OTEL_METRICS_EXPORTER=none, config forces DD_METRICS_OTEL_ENABLED back to false, so the metrics positive case no longer observes the enabled flag. Clear all three OTEL_*_EXPORTER selectors in the shared cleanup so the tests are deterministic regardless of the surrounding shell. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
CI note
The
integration-webpack (node-active / node-latest)failures are pre-existing and unrelated to this change: the webpack test fixture'snpm run buildfails resolving a transitive dependency (@ljharb/tsconfig). The same two jobs fail intermittently onmaster, and the other Node versions (oldest/maintenance) pass. Not introduced by this PR.