Skip to content

feat(otel): add OTel consistent probability sampling state to spans exported through OTLP - #10189

Merged
vpellan merged 2 commits into
masterfrom
vpellan/otlp-th-rv-support
Oct 5, 2026
Merged

vpellan merged 2 commits into
masterfrom
vpellan/otlp-th-rv-support

Conversation

@vpellan

@vpellan vpellan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

This is a follow up to #10117 and implements the same behaviour but on OTLP

Additional Notes

Locally tested against DataDog/system-tests#7372 (tests/otel/test_tracing_otlp.py::Test_Otlp_**_Ot)
I will update the manifests once this is merged

@vpellan
vpellan requested review from a team as code owners September 7, 2026 11:19
@vpellan
vpellan requested a review from khanayan123 September 7, 2026 11:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T10:51:37.923542Z 4bd1206 New commits
🔒 Security Review ✅ Completed 2026-10-01T10:52:21.791169Z 4bd1206 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vpellan
vpellan marked this pull request as draft September 7, 2026 12:09
Base automatically changed from vpellan/otel-threshold-random-value to master October 1, 2026 09:06
@vpellan
vpellan force-pushed the vpellan/otlp-th-rv-support branch from da97147 to 5218e35 Compare October 1, 2026 10:17
@dd-octo-sts

dd-octo-sts Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 9.33 MB
Deduped: 10.06 MB
No deduping: 10.06 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.5.1 | 127.66 kB | 513.61 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.84%. Comparing base (9929cb5) to head (4bd1206).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10189       +/-   ##
===========================================
+ Coverage   77.59%   98.84%   +21.25%     
===========================================
  Files        1032     1047       +15     
  Lines      163552   168838     +5286     
  Branches       59       74       +15     
===========================================
+ Hits       126913   166895    +39982     
+ Misses      36639     1943    -34696     
Flag Coverage Δ
ai-guard 64.06% <78.57%> (-0.01%) ⬇️
apm-capabilities 54.94% <100.00%> (+0.01%) ⬆️
apm-integrations 81.33% <78.57%> (?)
appsec 57.99% <78.57%> (?)
debugger 69.81% <78.57%> (+<0.01%) ⬆️
instrumentation 55.46% <78.57%> (-0.01%) ⬇️
llmobs 80.48% <78.57%> (-0.02%) ⬇️
master-coverage 98.84% <100.00%> (?)
openfeature 66.05% <78.57%> (-0.02%) ⬇️
platform 68.92% <100.00%> (+0.02%) ⬆️
profiling 66.33% <78.57%> (-0.02%) ⬇️
serverless 65.83% <78.57%> (-0.01%) ⬇️
test-optimization 82.15% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 2 tests - 2 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 98.27% (+20.70%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4bd1206 | Docs | View more details | Give us feedback!

@vpellan
vpellan marked this pull request as ready for review October 1, 2026 10:31
@pr-commenter

pr-commenter Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-01 11:02:37

Comparing candidate commit 4bd1206 in PR branch vpellan/otlp-th-rv-support with baseline commit 9929cb5 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2319 metrics, 12 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:appsec-appsec-enabled-24

  • unstable max_rss_usage [-12.658MB; +18.885MB] or [-4.486%; +6.692%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-24

  • unstable max_rss_usage [-26.908MB; +7.418MB] or [-8.240%; +2.272%]

scenario:dogstatsd-aggregated-20

  • unstable execution_time [-96.464ms; +174.464ms] or [-4.924%; +8.906%]
  • unstable throughput [-840510.504op/s; +443413.320op/s] or [-6.807%; +3.591%]

scenario:dogstatsd-aggregated-26

  • unstable execution_time [-81.783ms; +91.801ms] or [-4.974%; +5.583%]

scenario:plugin-cassandra-driver-batch-20

  • unstable cpu_user_time [-122.832ms; +159.423ms] or [-6.096%; +7.912%]
  • unstable execution_time [-123.198ms; +159.140ms] or [-6.100%; +7.880%]
  • unstable throughput [-57503.712op/s; +47720.000op/s] or [-5.758%; +4.778%]

scenario:plugin-cassandra-driver-batch-24

  • unstable cpu_usage_percentage [-6.984%; +4.527%]
  • unstable execution_time [-146.302ms; +226.713ms] or [-6.530%; +10.119%]
  • unstable throughput [-64839.997op/s; +42131.309op/s] or [-7.194%; +4.674%]

scenario:plugin-memcached-hashring-24

  • unstable execution_time [-155.851ms; +170.057ms] or [-6.108%; +6.665%]

@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: 5218e350a5

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

Comment thread packages/dd-trace/src/span_processor.js Outdated
@vpellan
vpellan removed this pull request from stack #10190 October 5, 2026 08:05
@vpellan
vpellan merged commit 59e5514 into master Oct 5, 2026
716 of 717 checks passed
@vpellan
vpellan deleted the vpellan/otlp-th-rv-support branch October 5, 2026 08:06
dd-octo-sts Bot pushed a commit that referenced this pull request Oct 6, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Oct 6, 2026
dd-octo-sts Bot pushed a commit that referenced this pull request Oct 6, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Oct 6, 2026
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