-
Notifications
You must be signed in to change notification settings - Fork 231
[apache] [jax-rs2] Instrumentation specific multiple span reporting Issue #297
[apache] [jax-rs2] Instrumentation specific multiple span reporting Issue #297
Conversation
@@ -147,6 +148,10 @@ public SpanContext context() { | |||
|
|||
@Override | |||
public void finish() { | |||
if (finished) { |
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.
this logic should be in the finishWithDuration
method, and inside the synchronized block
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
===========================================
+ Coverage 83% 83.1% +0.09%
- Complexity 551 553 +2
===========================================
Files 91 91
Lines 2165 2160 -5
Branches 244 244
===========================================
- Hits 1797 1795 -2
+ Misses 267 266 -1
+ Partials 101 99 -2
Continue to review full report at Codecov.
|
Could you split this into two separate PRs by separating the instrumentation fixes from the changes in the Span class? |
@vprithvi definitely -- lemme just remove the span class changes |
2b01739
to
41a0f4e
Compare
…s depend on thread local, and instead on the implementation specific http context propagation mechanisms Signed-off-by: Debosmit Ray <debo@uber.com>
41a0f4e
to
4e58e60
Compare
@@ -124,7 +130,7 @@ public void testHttpClientTracing() throws Exception { | |||
private void verifyTracing(Span parentSpan) { | |||
//Assert that traces are correctly emitted by the client | |||
List<Span> spans = reporter.getSpans(); | |||
assertEquals(3, spans.size()); | |||
assertEquals(2, spans.size()); |
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.
what is the reason for this change?
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.
Previously, when pop()
was getting called, it would make another call to report the span. Hence the reporter was getting an extra span, and the last 2 spans were identical. This change proves that the core issue is fixed.
javax.ws.rs.client.ClientRequestContext
Per #295