-
Notifications
You must be signed in to change notification settings - Fork 289
Conversation
Signed-off-by: Won Jun Jang <wjang@uber.com>
@@ -239,24 +239,21 @@ func TestDebugCorrelationID(t *testing.T) { | |||
defer closer.Close() | |||
|
|||
h := http.Header{} | |||
h.Add(JaegerDebugHeader, "value1") | |||
val := "value1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to change, just cleanup
@@ -80,7 +80,7 @@ func (s *Span) SetOperationName(operationName string) opentracing.Span { | |||
// SetTag implements SetTag() of opentracing.Span | |||
func (s *Span) SetTag(key string, value interface{}) opentracing.Span { | |||
s.observer.OnSetTag(key, value) | |||
if key == string(ext.SamplingPriority) && setSamplingPriority(s, value) { | |||
if key == string(ext.SamplingPriority) && !setSamplingPriority(s, value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to debug sample here, we set the "sampling.priority" tag so the agent knows that the root of the debug trace started here.
Codecov Report
@@ Coverage Diff @@
## master #264 +/- ##
==========================================
+ Coverage 85.7% 85.97% +0.27%
==========================================
Files 54 54
Lines 2848 2853 +5
==========================================
+ Hits 2441 2453 +12
+ Misses 287 282 -5
+ Partials 120 118 -2
Continue to review full report at Codecov.
|
@@ -235,7 +235,7 @@ func (t *Tracer) startSpanWithOptions( | |||
ctx.spanID = SpanID(ctx.traceID.Low) | |||
ctx.parentID = 0 | |||
ctx.flags = byte(0) | |||
if hasParent && parent.isDebugIDContainerOnly() { | |||
if hasParent && parent.isDebugIDContainerOnly() && t.isDebugAllowed(operationName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@isaachier I think I forgot this case, if the debug trace is started via using headers, the tag will be "jaeger-debug-id". I guess we could just add the "sampling.priority" tag here too...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean an extracted span contains that header or a client locally used headers to start debug tracing somehow. I don't really understand the latter.
Please close this because it is duplicated in #274. |
closed, replaced by #274 |
Signed-off-by: Won Jun Jang wjang@uber.com