-
Notifications
You must be signed in to change notification settings - Fork 231
Fix sampling when jaeger-baggage
header is given
#542
Conversation
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #542 +/- ##
============================================
- Coverage 88.68% 88.63% -0.06%
+ Complexity 516 515 -1
============================================
Files 66 66
Lines 1891 1891
Branches 243 243
============================================
- Hits 1677 1676 -1
Misses 141 141
- Partials 73 74 +1
Continue to review full report at Codecov.
|
|
||
import org.junit.Test; | ||
|
||
public class PropagationTest { | ||
@Test | ||
public void testDebugCorrelationId() { |
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.
moved to AdhocHeadersTest
@@ -198,29 +192,4 @@ public void testCustomSpanOnSpanManager() { | |||
// check | |||
assertEquals(activeSpan, tracer.activeSpan()); | |||
} | |||
|
|||
@Test |
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.
Moved to AdhocHeadersTest
Signed-off-by: Yuri Shkuro <ys@uber.com>
jaegerSpanContext = span.context(); | ||
assertTrue(jaegerSpanContext.isSampled()); | ||
assertTrue(jaegerSpanContext.isDebug()); | ||
assertEquals("Coraline", span.getTags().get(Constants.DEBUG_ID_HEADER_KEY)); |
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.
moved to AdhocHeadersTest
JaegerSpan mockSpan = Mockito.mock(JaegerSpan.class); | ||
tracer.scopeManager().activate(mockSpan, true); | ||
assertEquals(mockSpan, tracer.activeSpan()); | ||
} |
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.
moved to ActiveSpanTest
|
||
// check | ||
assertEquals(activeSpan, tracer.activeSpan()); | ||
} |
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.
moved to ActiveSpanTest
|
||
assertEquals("must have baggage", "v1", span.getBaggageItem("k1")); | ||
assertEquals("must have baggage", "v2", span.getBaggageItem("k2")); | ||
} |
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.
moved to AdhocHeadersTest
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright (c) 2016, Uber Technologies, Inc | |||
* Copyright (c) 2018, The Jaeger Authors. |
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.
Copyright (c) 2016-2017, Uber Technologies, Inc
?
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.
Nope, considering that active span did not exist in 2016 and most of 2017, and it was all implemented by people not from Uber.
Signed-off-by: Yuri Shkuro <ys@uber.com>
Fix for #541
Signed: Yuri the Bug Maker