Skip to content

test(otel): port otel tracestate sampling rate scenarios to parametric - #7518

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 19 commits into
mainfrom
milan.garnier/otel-tracestate-ot-th
Aug 19, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 19 commits into
mainfrom
milan.garnier/otel-tracestate-ot-th

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move the multi-rate tracestate golden-vector matrix and precision-boundary coverage to tests/parametric/test_otel_tracestate_sampling.py; retain the rate-0.5 end-to-end sampling regression.
  • Keep the direct end-to-end forwarding, force-keep, and malformed-input coverage; run malformed-input checks under the general sampling scenario.
  • Share tracestate thresholds, golden vectors, and forwarding values through tests/otel/utils.py; the OTLP end-to-end cases consume those values without changing their assertions.
  • Remove the dedicated otel_sampling_rate_* scenarios.
  • Add matching parametric manifest declarations: Go and Ruby remain version-gated, while unsupported tracer targets remain missing_feature.

Validation

  • ./format.sh: mypy, ruff, YAML, manifest parsing, and AI Guard checks pass. ShellCheck is blocked by the unrelated directory error at utils/build/docker/internal_server/app.sh.
  • git diff --check
  • Targeted Python syntax compilation

No broad test suite was run.

@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/otel/utils.py                                                     @DataDog/system-tests-core
tests/parametric/test_otel_tracestate_sampling.py                       @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
manifests/cpp.yml                                                       @DataDog/dd-trace-cpp
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
manifests/rust.yml                                                      @DataDog/apm-rust
tests/otel/test_tracing_otlp.py                                         @DataDog/system-tests-core
tests/test_otel_tracestate_sampling.py                                  @DataDog/system-tests-core
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@MilanGarnier

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 3aa2ecb08c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@MilanGarnier MilanGarnier changed the title test(otel): port tracestate sampling to parametric test(otel): port tracestate sampling to parametric [cpp@milan.garnier/otel-tracestate-ot-th] Aug 14, 2026
@MilanGarnier MilanGarnier changed the title test(otel): port tracestate sampling to parametric [cpp@milan.garnier/otel-tracestate-ot-th] test(otel): port otel tracestate sampling tests to parametric [cpp@milan.garnier/otel-tracestate-ot-th] Aug 14, 2026
@MilanGarnier MilanGarnier changed the title test(otel): port otel tracestate sampling tests to parametric [cpp@milan.garnier/otel-tracestate-ot-th] test(otel): port otel tracestate sampling tests to parametric Aug 14, 2026
@MilanGarnier
MilanGarnier marked this pull request as ready for review August 14, 2026 15:04
@MilanGarnier
MilanGarnier requested review from a team as code owners August 14, 2026 15:04
@MilanGarnier
MilanGarnier requested review from ZStriker19, christophe-papazian and claponcet and removed request for a team August 14, 2026 15:04
@MilanGarnier
MilanGarnier requested a review from a team as a code owner August 19, 2026 12:21
@MilanGarnier MilanGarnier changed the title test(otel): port otel tracestate sampling tests to parametric test(otel): port otel tracestate sampling rate scenarios to parametric Aug 19, 2026
Comment thread tests/otel/test_tracing_otlp.py Outdated
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 3005271 into main Aug 19, 2026
2812 of 2814 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the milan.garnier/otel-tracestate-ot-th branch August 19, 2026 18:45
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/dd-trace-py that referenced this pull request Sep 3, 2026
## Description

<!-- Provide an overview of the change and motivation for the change.
     Implementation detail and rationale belong here, not in the release note -
     release notes are customer-facing (see docs/releasenotes.rst). -->
     
Add support for OTel sampling in distributed tracing, by reading and emitting `ot.th` and `ot.rv` tags. These tags will be forwarded to services using OTel SDKs, that should forward them to the backend.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

Locally passes DataDog/system-tests#7518

## Risks

<!-- Note any risks associated with this change, or "None" if no risks -->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->


Co-authored-by: victor.pellan <victor.pellan@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants