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

tracer: dual sampling, make sure priorities -1 and 2 are handled #137

Merged
merged 3 commits into from
Jan 16, 2018

Conversation

ufoot
Copy link
Member

@ufoot ufoot commented Dec 26, 2017

Allow usage of -1 as a priority sampling value, 2 was already handled, but negative values were blocked.

@ufoot ufoot added this to the 0.6.1 milestone Dec 26, 2017
@ufoot ufoot requested review from AlexJF and gabsn December 27, 2017 07:52
AlexJF
AlexJF previously approved these changes Dec 27, 2017
if priority >= 0 {
s.SetMetric(samplingPriorityKey, float64(priority))
}
s.SetMetric(samplingPriorityKey, float64(priority))
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM. Maybe add the -1 case to the method's comment?

gabsn
gabsn previously approved these changes Jan 2, 2018
Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

Left a question that I think we should address before the merge.

tracer/span.go Outdated
// SetSamplingPriority sets the sampling priority.
// Default is 0, any higher value is interpreted as a hint on
// how interesting this span is, and should be kept by the backend.
// SetSamplingPriority sets the sampling priority. Possible values are:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we provide constants for these values?

@gbbr gbbr changed the title [dual sampling] make sure priorities -1 and 2 are handled tracer: dual sampling, make sure priorities -1 and 2 are handled Jan 16, 2018
@palazzem palazzem merged commit debee06 into master Jan 16, 2018
@palazzem palazzem deleted the christian/dualsampling branch January 16, 2018 19:09
Copy link

@wackywendell wackywendell left a comment

Choose a reason for hiding this comment

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

@ufoot a couple typos

// PriorityAutoReject informs the backend that a trace should be rejected and not stored.
// This is used by the builtin sampler.
PriorityAutoReject = 0
// PriorityAutoReject informs the backend that a trace should be kept and not stored.

Choose a reason for hiding this comment

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

@ufoot Looks like the name here (PriorityAutoReject) doesn't match the description (PriorityAutoKeep)? Typo?

// PriorityAutoReject informs the backend that a trace should be kept and not stored.
// This is used by the builtin sampler.
PriorityAutoKeep = 1
// PriorityUserReject informs the backend that a trace should be kept and not stored.

Choose a reason for hiding this comment

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

@ufoot And here

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.

None yet

6 participants