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

Fix priority sampling dropping traces #686

Merged
merged 6 commits into from
Feb 8, 2019

Conversation

delner
Copy link
Contributor

@delner delner commented Feb 7, 2019

The Datadog::PrioritySampler was incorrectly applying an internal sampler to some traces, and would mark them as rejected, thus preventing them from reaching the agent.

This pull request removes this sampling behavior, and instead marks all spans as "sampled" when priority sampling is enabled, which allows all spans and traces to reach the agent.

@delner delner added bug Involves a bug core Involves Datadog core libraries labels Feb 7, 2019
@delner delner self-assigned this Feb 7, 2019
pawelchcki
pawelchcki previously approved these changes Feb 7, 2019
Copy link
Contributor

@pawelchcki pawelchcki left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for digging into it!

I've left a few optional comments to suggest moving away from word sampling in this context as we're actually assigning a priority and no sampling will ever be done.

But it might be just me holding a grudge against word sampling here, and would like to find a way to ensure no one will be misled by it (like I was :) ).

lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

really minor comments, otherwise I think this looks good.

input again from @LotharSee would be great, and I want to step through it again in a bit

lib/ddtrace/sampler.rb Outdated Show resolved Hide resolved
lib/ddtrace/sampler.rb Show resolved Hide resolved
spec/ddtrace/sampler_spec.rb Show resolved Hide resolved
@delner delner added this to the 0.19.1 milestone Feb 7, 2019
@delner delner merged commit c9ef9ac into master Feb 8, 2019
@delner delner deleted the fix/priority_sampling_dropping_traces branch February 8, 2019 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants