feat(tracing): report OTLP export status in startup log#4056
Draft
bm1549 wants to merge 1 commit into
Draft
Conversation
Add otlp_traces_export_enabled, otlp_metrics_export_enabled, and otlp_logs_export_enabled to the "DATADOG TRACER CONFIGURATION" startup diagnostic log, matching the shared cross-language schema. PHP exports traces natively via the Datadog Agent (never over OTLP), so otlp_traces_export_enabled is always false. The metrics and logs flags reflect the existing DD_METRICS_OTEL_ENABLED / DD_LOGS_OTEL_ENABLED configs -- the same request-scoped values the userland OpenTelemetry resolver consults -- so the log matches actual export behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds three boolean fields to the "DATADOG TRACER CONFIGURATION" startup log (
tracer/tracer_startup_logging.c):otlp_traces_export_enabled: constantfalse. PHP has no OTLP trace export onmaster;OTEL_TRACES_EXPORTER=otlpis treated as invalid, and traces always go to the Datadog Agent.otlp_metrics_export_enabled:get_DD_METRICS_OTEL_ENABLED().otlp_logs_export_enabled:get_DD_LOGS_OTEL_ENABLED().DD_METRICS_OTEL_ENABLEDandDD_LOGS_OTEL_ENABLEDwere already registered, so no new configuration registration was needed. The metrics and logs getters read the same request-scoped values the userland OpenTelemetry resolver (DatadogResolver) consults, so the log matches actual export behavior.The three
.phptstartup-logging tests were updated to cover the new fields, including a case that setsDD_METRICS_OTEL_ENABLED=1andDD_LOGS_OTEL_ENABLED=1and asserts the metrics/logs flags flip totrue.Part of a cross-tracer effort to report OTLP export status with identical JSON keys across dd-trace-*.
Note for reviewers: current
masteralready sits at the ZAI configuration ceiling (NUMBER_OF_CONFIGURATIONS == ZAI_CONFIG_ENTRIES_COUNT_MAX == 300), so a clean non-Windows build can trip the_Static_assertinext/configuration.cindependent of this change. This PR adds zero config entries, so it does not move that count, but CI may still surface the assert.Reviewer checklist
Related PRs — cross-tracer OTLP startup-log effort