Skip to content

Report OTLP export status in startup log#6096

Draft
bm1549 wants to merge 1 commit into
masterfrom
brian.marks/otlp-export-startup-log
Draft

Report OTLP export status in startup log#6096
bm1549 wants to merge 1 commit into
masterfrom
brian.marks/otlp-export-startup-log

Conversation

@bm1549

@bm1549 bm1549 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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_enabled is a constant false: Ruby has no OTLP trace exporter, and OTEL_TRACES_EXPORTER=otlp is unsupported, so spans are always sent to Datadog in the native format.
  • otlp_metrics_export_enabled reflects Datadog.configuration.opentelemetry.metrics.enabled (DD_METRICS_OTEL_ENABLED).
  • otlp_logs_export_enabled reflects Datadog.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 opentelemetry settings namespace through a defensive helper, so a missing namespace reports false instead of raising.

How to test the change?

Covered by spec/datadog/core/diagnostics/environment_logger_spec.rb, which asserts the default state (all false), the metrics-enabled and logs-enabled cases, and the fallback when the opentelemetry namespace is unavailable.


Related PRs — cross-tracer OTLP startup-log effort

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>
@bm1549 bm1549 added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Jul 24, 2026
@dd-octo-sts dd-octo-sts Bot added the core Involves Datadog core libraries label Jul 24, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Typing analysis

Note: Ignored files are excluded from the next sections.

Untyped methods

This 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:
sig/datadog/core/diagnostics/environment_logger.rbs:40
└── def self.opentelemetry_settings: () -> untyped
sig/datadog/core/diagnostics/environment_logger.rbs:41
└── def self.hash_serializer: (untyped h) -> untyped
Cleared:
sig/datadog/core/diagnostics/environment_logger.rbs:20
└── def self.collect_config!: () -> { date: untyped, os_name: untyped, version: untyped, lang: untyped, lang_version: untyped, env: untyped, service: untyped, dd_version: untyped, debug: untyped, tags: untyped, runtime_metrics_enabled: untyped, vm: untyped, health_metrics_enabled: untyped }
sig/datadog/core/diagnostics/environment_logger.rbs:37
└── def self.hash_serializer: (untyped h) -> untyped
Partially typed methods (+1-0)Introduced:
sig/datadog/core/diagnostics/environment_logger.rbs:20
└── def self.collect_config!: () -> { date: untyped, os_name: untyped, version: untyped, lang: untyped, lang_version: untyped, env: untyped, service: untyped, dd_version: untyped, debug: untyped, tags: untyped, runtime_metrics_enabled: untyped, vm: untyped, health_metrics_enabled: untyped, otlp_traces_export_enabled: bool, otlp_metrics_export_enabled: bool, otlp_logs_export_enabled: bool }

If you believe a method or an attribute is rightfully untyped or partially typed, you can add # untyped:accept on the line before the definition to remove it from the stats.

@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jul 24, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 90.00%
Overall Coverage: 89.85% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0d0274b | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jul 24, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-24 02:00:36

Comparing candidate commit 0d0274b in PR branch brian.marks/otlp-export-startup-log with baseline commit e12d786 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 1 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:tracing - trace.to_digest - Continue

  • unstable throughput [-1451.996op/s; +1629.344op/s] or [-4.973%; +5.580%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant