Skip to content

Report OTLP export status in tracer startup log#12062

Open
bm1549 wants to merge 2 commits into
masterfrom
brian.marks/otlp-export-startup-log
Open

Report OTLP export status in tracer startup log#12062
bm1549 wants to merge 2 commits into
masterfrom
brian.marks/otlp-export-startup-log

Conversation

@bm1549

@bm1549 bm1549 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Adds three boolean fields to the "DATADOG TRACER CONFIGURATION" startup log emitted by dd-trace-core's StatusLogger.toJson:

  • otlp_traces_export_enabled: config.isTraceOtlpExporterEnabled()
  • otlp_metrics_export_enabled: config.isMetricsOtelEnabled() && config.isMetricsOtlpExporterEnabled()
  • otlp_logs_export_enabled: config.isLogsOtelEnabled() && config.isLogsOtlpExporterEnabled()

Also adds a new StatusLoggerTest covering the default (disabled) case, the fully-enabled case, and the case where the OTLP exporter is selected but the metrics and logs OTel signals stay disabled.

Motivation

Part of a cross-tracer effort to report OTLP export status in each tracer's startup log. The JSON keys are identical across the dd-trace-* libraries so the fields can be read the same way regardless of language.

Additional Notes

Traces report directly from the OTLP exporter setting. Metrics and logs require both the OTel signal to be enabled and the OTLP exporter to be selected, so those two fields combine both checks.

This is a diagnostic logging change and does not alter tracer runtime behavior.

Contributor Checklist


Related PRs — cross-tracer OTLP startup-log effort

Report whether the tracer exports each telemetry signal over OTLP in the
"DATADOG TRACER CONFIGURATION" startup log via three boolean fields:
otlp_traces_export_enabled, otlp_metrics_export_enabled, and
otlp_logs_export_enabled. Metrics and logs require both the OTel signal to
be enabled and the OTLP exporter to be selected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@datadog-official

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.01 s 13.93 s [-0.1%; +1.2%] (no difference)
startup:insecure-bank:tracing:Agent 12.96 s 13.02 s [-1.2%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 16.89 s 16.78 s [-0.6%; +2.0%] (no difference)
startup:petclinic:iast:Agent 16.88 s 16.49 s [-2.0%; +6.8%] (no difference)
startup:petclinic:profiling:Agent 16.69 s 16.74 s [-1.6%; +1.0%] (no difference)
startup:petclinic:sca:Agent 16.91 s 16.75 s [+0.0%; +2.0%] (maybe worse)
startup:petclinic:tracing:Agent 16.15 s 16.23 s [-1.4%; +0.4%] (no difference)

Commit: 6d1065b2 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@bm1549
bm1549 marked this pull request as ready for review July 24, 2026 21:38
@bm1549
bm1549 requested a review from a team as a code owner July 24, 2026 21:38
@bm1549
bm1549 requested a review from mcculls July 24, 2026 21:38

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The startup log fields match the runtime activation rules: traces follow OTLP exporter selection, while metrics and logs require both their OTel signal and OTLP exporter to be enabled. Alternate exporters, mixed signal states, and case variations are handled by the existing accessors; no diff-only behavioral regression was identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit a4287c5 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4287c54a9

ℹ️ 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".

writer.name("otlp_traces_export_enabled");
writer.value(config.isTraceOtlpExporterEnabled());
writer.name("otlp_metrics_export_enabled");
writer.value(config.isMetricsOtelEnabled() && config.isMetricsOtlpExporterEnabled());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Report span-metrics OTLP export as enabled

When users enable dd.otel.traces.span.metrics.enabled=true while leaving the OpenTelemetry metrics signal disabled, the tracer still routes client-side trace metrics through OtlpStatsMetricWriter in MetricsAggregatorFactory, but this startup-log field remains false because it only checks metrics.otel.enabled && metrics.otel.exporter=otlp. That makes the new diagnostic field under-report OTLP metrics export for traced traffic in exactly the explicit span-metrics override case, so support tooling or system tests reading otlp_metrics_export_enabled can conclude no OTLP metrics are being sent while the tracer is actually exporting them.

Useful? React with 👍 / 👎.

writer.name("data_streams_transaction_extractors");
writer.value(config.getDataStreamsTransactionExtractors());
writer.name("otlp_traces_export_enabled");
writer.value(config.isTraceOtlpExporterEnabled());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for writer.type before reporting trace OTLP export

When dd.trace.otel.exporter=otlp is combined with an explicit dd.writer.type override such as DDAgentWriter or LoggingWriter, Config still reports the OTLP exporter as selected here, but WriterFactory uses config.getWriterType() to build that non-OTLP writer instead. In that configuration the startup log now says otlp_traces_export_enabled=true even though trace payloads are not exported over OTLP, which makes the new cross-tracer diagnostic field misleading for users who override the writer.

Useful? React with 👍 / 👎.

Report otlp_traces_export_enabled from the resolved writer type
(OtlpWriter) rather than the OTLP exporter selection, since an explicit
dd.writer.type override wins over dd.trace.otel.exporter=otlp in
WriterFactory. Also report otlp_metrics_export_enabled when client-side
span metrics are enabled, since those are exported over OTLP via
OtlpStatsMetricWriter independently of the OTel metrics signal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant