Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow RateSampler with a sampling rate of zero #3295

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Allow RateSampler with a sampling rate of zero #3295

merged 1 commit into from
Dec 1, 2023

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Nov 30, 2023

2.0 Upgrade Guide notes

The custom sampler class Datadog::Tracing::Sampling::RateSampler now accepts a sample_rate of zero. This will drop all spans. Before 2.0, the RateSampler would fall back to a sample rate of 1.0 when provided with a sample_rate of zero.

Motivation:

This PR creates consistency across all sampling configurations: they all allowed a zero sampling rate, only RateSampler was the exception.

Additional Notes:

How to test the change?

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@marcotc marcotc requested a review from a team as a code owner November 30, 2023 23:26
@marcotc marcotc self-assigned this Nov 30, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (2.0@08a0d56). Click here to learn what that means.

Additional details and impacted files
@@          Coverage Diff           @@
##             2.0    #3295   +/-   ##
======================================
  Coverage       ?   97.99%           
======================================
  Files          ?     1248           
  Lines          ?    72058           
  Branches       ?     3401           
======================================
  Hits           ?    70616           
  Misses         ?     1442           
  Partials       ?        0           

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

@marcotc marcotc merged commit 22763b9 into 2.0 Dec 1, 2023
152 checks passed
@marcotc marcotc deleted the allow-zero branch December 1, 2023 20:10
@TonyCTHsu TonyCTHsu added this to the 2.0 milestone Feb 20, 2024
@ivoanjo ivoanjo added the 2.0 label Mar 14, 2024
@TonyCTHsu TonyCTHsu modified the milestones: 2.0, 2.0.0.beta1 Mar 22, 2024
@marcotc marcotc mentioned this pull request Apr 2, 2024
2 tasks
@TonyCTHsu TonyCTHsu mentioned this pull request Jun 6, 2024
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.

None yet

5 participants