Skip to content

WIP: feat(otel): add support for opentelemetry logs#3748

Draft
rachelyangdog wants to merge 3 commits intomasterfrom
rachel.yang/otel-logs
Draft

WIP: feat(otel): add support for opentelemetry logs#3748
rachelyangdog wants to merge 3 commits intomasterfrom
rachel.yang/otel-logs

Conversation

@rachelyangdog
Copy link
Copy Markdown
Contributor

@rachelyangdog rachelyangdog commented Mar 27, 2026

Description

Adds OpenTelemetry logs support to dd-trace-php, gated behind a new DD_LOGS_OTEL_ENABLED configuration flag.

New config flag: DD_LOGS_OTEL_ENABLED (default: false) enables OTel log collection and OTLP export. When enabled, Datadog's own log injection is suppressed so the two pipelines don't conflict.

  • CompositeResolver now handles logs signal endpoints and protocols alongside the existing metrics support. Endpoint/protocol resolution is refactored from metrics-specific to signal-agnostic

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@rachelyangdog rachelyangdog requested review from a team as code owners March 27, 2026 20:42
@rachelyangdog rachelyangdog marked this pull request as draft March 27, 2026 20:42
@rachelyangdog rachelyangdog requested a review from bwoebi March 27, 2026 20:42
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.78%. Comparing base (fd1ba67) to head (5e7dc32).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3748      +/-   ##
==========================================
- Coverage   68.85%   68.78%   -0.08%     
==========================================
  Files         166      166              
  Lines       19015    19015              
  Branches     1792     1792              
==========================================
- Hits        13093    13079      -14     
- Misses       5111     5124      +13     
- Partials      811      812       +1     
Flag Coverage Δ
helper-rust-integration 78.82% <ø> (ø)
helper-rust-unit 49.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd1ba67...5e7dc32. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 bot commented Mar 27, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.64% (-0.04%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5e7dc32 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Mar 27, 2026

Benchmarks [ tracer ]

Benchmark execution time: 2026-03-28 22:24:11

Comparing candidate commit 5e7dc32 in PR branch rachel.yang/otel-logs with baseline commit fd1ba67 in branch master.

Found 2 performance improvements and 7 performance regressions! Performance is the same for 181 metrics, 4 unstable metrics.

scenario:ContextPropagationBench/benchExtractHeaders128Bit-opcache

  • 🟩 execution_time [-755.236ns; -720.764ns] or [-47.261%; -45.104%]

scenario:ContextPropagationBench/benchExtractTraceContext128Bit-opcache

  • 🟩 execution_time [-918.899ns; -731.101ns] or [-34.262%; -27.260%]

scenario:LogsInjectionBench/benchLogsInfoInjection-opcache

  • 🟥 execution_time [+339.827ns; +652.973ns] or [+4.074%; +7.829%]

scenario:MessagePackSerializationBench/benchMessagePackSerialization-opcache

  • 🟥 execution_time [+7.440µs; +8.400µs] or [+7.240%; +8.174%]

scenario:SamplingRuleMatchingBench/benchRegexMatching1

  • 🟥 execution_time [+53.482ns; +128.718ns] or [+3.695%; +8.892%]

scenario:SamplingRuleMatchingBench/benchRegexMatching2

  • 🟥 execution_time [+57.356ns; +118.044ns] or [+3.908%; +8.043%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3

  • 🟥 execution_time [+67.305ns; +146.495ns] or [+4.564%; +9.933%]

scenario:SamplingRuleMatchingBench/benchRegexMatching3-opcache

  • 🟥 execution_time [+48.383ns; +120.017ns] or [+3.084%; +7.649%]

scenario:SamplingRuleMatchingBench/benchRegexMatching4

  • 🟥 execution_time [+67.191ns; +160.409ns] or [+4.589%; +10.956%]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants