Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Upgrade all samplers to v2 #450

Merged
merged 5 commits into from
Oct 16, 2019
Merged

Conversation

yurishkuro
Copy link
Member

Part of #449.

Yuri Shkuro added 3 commits October 15, 2019 17:36
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

Merging #450 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #450   +/-   ##
=======================================
  Coverage   84.69%   84.69%           
=======================================
  Files          33       33           
  Lines        1503     1503           
=======================================
  Hits         1273     1273           
  Misses        168      168           
  Partials       62       62

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c0cf97...50ed77a. Read the comment docs.

Signed-off-by: Yuri Shkuro <ys@uber.com>
@@ -79,37 +62,26 @@ func NewRemotelyControlledSampler(
return sampler
}

func applySamplerOptions(opts ...SamplerOption) samplerOptions {
Copy link
Member Author

Choose a reason for hiding this comment

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

moved to sampler_remote_options

Signed-off-by: Yuri Shkuro <ys@uber.com>
@@ -48,29 +45,15 @@ type RemotelyControlledSampler struct {
doneChan chan *sync.WaitGroup
}

type httpSamplingManager struct {
Copy link
Member Author

@yurishkuro yurishkuro Oct 15, 2019

Choose a reason for hiding this comment

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

moved to bottom of the file

@yurishkuro yurishkuro requested a review from vprithvi October 15, 2019 22:30
Comment on lines +324 to +326
samplerV1 := s.getSamplerForOperation(operationName)
sampled, tags := samplerV1.IsSampled(span.context.TraceID(), operationName)
return SamplingDecision{sample: sampled, retryable: false, tags: tags}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is new behavior - do we require this right now?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean new to Go client?

I don't think we can avoid it. The main change is not actually here, but in OnCreateSpan, which must return retryable=true in order for tag sampling to work (otherwise the state will be finalized). So if we already have that in OnCreateSpan, adding OnSetOperationName() doesn't change things that much, imo.

@yurishkuro yurishkuro merged commit d354d6a into jaegertracing:master Oct 16, 2019
@yurishkuro yurishkuro deleted the samplers-v2 branch October 16, 2019 19:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants