RUM-16331: Add integration test for cross-product trace sampling rebasing#3464
Merged
Conversation
hamorillo
marked this pull request as ready for review
May 21, 2026 10:47
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5850a5daff
ℹ️ 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".
hamorillo
force-pushed
the
hector.morilloprieto/RUM-16331
branch
from
May 21, 2026 11:16
5850a5d to
9f7ae98
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3464 +/- ##
===========================================
- Coverage 72.31% 72.17% -0.14%
===========================================
Files 964 964
Lines 35500 35500
Branches 5897 5897
===========================================
- Hits 25670 25621 -49
- Misses 8237 8274 +37
- Partials 1593 1605 +12 🚀 New features to boost your workflow:
|
kikoveiga
approved these changes
May 21, 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.
What does this PR do?
Adds
TraceCrossProductSamplingTestinreliability/single-fit/okhttp/with 13 integration tests that verify the rebased effective sample rate (traceSampleRate × sessionSampleRate / 100) is correctly applied end-to-end through both SDK entry points that wireSessionRebasedSampler.Motivation
Follow-up to RUM-15138 (PR #3402). Originated from this review comment.
Additional Notes
Test structure (13 tests):
DatadogInterceptor— 6 curated boundary tests (rebased keep/drop, rebasing changes outcome vs raw rate, sessionRate=100/0 edges, traceRate=0 edge).ApmNetworkInstrumentationConfigurationwithheaderPropagationOnly— 3 curated boundary tests.(traceRate, sessionRate)pair — 2 statistical tests (one per entry point).Determinism approach: Curated session UUIDs are pre-computed from the Knuth-hash math in
DeterministicSampler, yielding exact sampled/dropped outcomes without statistical tolerance. Aggregate tests use Forge-seeded random tokens with ±5pp tolerance.Observation channel: Both rebased paths drop the client-side span (
DatadogInterceptor.canSendSpan = falsewhen RUM is registered;headerPropagationOnlydrops by design), so assertions target the propagatedx-datadog-sampling-priorityrequest header viaMockWebServer.No production code changes. Test-only PR.
Review checklist (to be filled by reviewers)