Report OTLP export status in startup log#6096
Conversation
Report whether the tracer exports each telemetry signal over OTLP in the "DATADOG CONFIGURATION - CORE" startup log via three boolean fields: otlp_traces_export_enabled (always false; Ruby has no OTLP trace exporter), otlp_metrics_export_enabled, and otlp_logs_export_enabled. The metrics and logs values read from the opentelemetry settings namespace, accessed defensively so an unregistered namespace defaults to false. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 2 untyped methods and 1 partially typed method, and clears 2 untyped methods. It increases the percentage of typed methods from 68.16% to 68.17% (+0.01%). Untyped methods (+2-2)❌ Introduced:Partially typed methods (+1-0)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 0d0274b | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-24 02:00:36 Comparing candidate commit 0d0274b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 1 unstable metrics.
|
What does this PR do?
Adds three boolean fields to the CORE section of the "DATADOG CONFIGURATION" startup log (
lib/datadog/core/diagnostics/environment_logger.rb):otlp_traces_export_enabledis a constantfalse: Ruby has no OTLP trace exporter, andOTEL_TRACES_EXPORTER=otlpis unsupported, so spans are always sent to Datadog in the native format.otlp_metrics_export_enabledreflectsDatadog.configuration.opentelemetry.metrics.enabled(DD_METRICS_OTEL_ENABLED).otlp_logs_export_enabledreflectsDatadog.configuration.opentelemetry.logs.enabled(DD_LOGS_OTEL_ENABLED).Specs and the RBS signature are updated to cover the new fields.
Motivation:
Part of a cross-tracer effort to report OTLP export status in the startup log using identical JSON keys across the dd-trace-* libraries.
Change log entry
None.
Additional Notes:
The metrics and logs values read from the
opentelemetrysettings namespace through a defensive helper, so a missing namespace reportsfalseinstead of raising.How to test the change?
Covered by
spec/datadog/core/diagnostics/environment_logger_spec.rb, which asserts the default state (allfalse), the metrics-enabled and logs-enabled cases, and the fallback when theopentelemetrynamespace is unavailable.Related PRs — cross-tracer OTLP startup-log effort