Skip to content

Conversation

@marco-saia-datadog
Copy link
Member

What does this PR do?

This PR modifies the logic to determine whether the trace should be sampled or not, by using the RUM Session ID first, before using the Trace sampling if no session can be found.

Motivation

Consistent trace sampling based on RUM Session ID allows RUM clients and the backend to come to a the same decision about sampling without relying on randomness for each trace.

Additional Notes

  • Introduced additional tests to verify the sampling behaviour

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@marco-saia-datadog marco-saia-datadog requested a review from a team as a code owner December 9, 2025 14:39
@marco-saia-datadog marco-saia-datadog changed the title [RUM-12493] v3: RUM Session ID based Consistent Trace Sampling [RUM-12493] [V3] RUM Session ID based Consistent Trace Sampling Dec 9, 2025
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-12493/rum-session-id-based-trace-sampling branch 2 times, most recently from 390ba0d to fcfaf0e Compare December 9, 2025 15:09
@marco-saia-datadog marco-saia-datadog self-assigned this Dec 9, 2025
fuzzybinary
fuzzybinary previously approved these changes Dec 9, 2025
Copy link
Member

@fuzzybinary fuzzybinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

sbarrio
sbarrio previously approved these changes Dec 10, 2025
Copy link
Contributor

@sbarrio sbarrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very thorough tests, top notch work!

@sbarrio sbarrio force-pushed the sbarrio/RUM-12894/initialization-api-restructuring-for-modularization branch from 41ea1eb to edd7045 Compare December 10, 2025 10:03
Base automatically changed from sbarrio/RUM-12894/initialization-api-restructuring-for-modularization to feature/v3 December 10, 2025 10:43
@sbarrio sbarrio dismissed stale reviews from fuzzybinary and themself December 10, 2025 10:43

The base branch was changed.

sbarrio
sbarrio previously approved these changes Dec 11, 2025
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-12493/rum-session-id-based-trace-sampling branch from fcfaf0e to 3e0c785 Compare December 15, 2025 09:39
sbarrio and others added 4 commits December 15, 2025 10:41
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-12493/rum-session-id-based-trace-sampling branch from 3e0c785 to bfdb696 Compare December 15, 2025 09:42
@marco-saia-datadog marco-saia-datadog merged commit 0cfe5ac into feature/v3 Dec 15, 2025
9 checks passed
@marco-saia-datadog marco-saia-datadog deleted the marcosaia/RUM-12493/rum-session-id-based-trace-sampling branch December 15, 2025 11:00
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.

4 participants