handle noop correctly - #4968
Conversation
|
|
9529a74 to
422f7d1
Compare
Codecov ReportBase: 91.26% // Head: 91.26% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #4968 +/- ##
=========================================
Coverage 91.26% 91.26%
- Complexity 4885 4886 +1
=========================================
Files 552 552
Lines 14431 14431
Branches 1373 1373
=========================================
Hits 13170 13170
Misses 874 874
Partials 387 387
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@carlosalberto can you take a look at this one? |
|
So this is an undocumented/corner-case of the OpenTracing API - for safety reasons, though, I'm happy to accept it - (I will add a note in the Spec's section for this, so other languages support this scenario as well). (OpenTracing's No-op |
422f7d1 to
c1b93ad
Compare
I see you what you mean. I realized later that the java doc for |
Co-authored-by: Jack Berg <jberg@newrelic.com>
We recently migrated our codebase from OpenTracing to OpenTelemetry and were delighted to take advantage of the
OpenTracingShim. Unfortunately we ran into issues with noop spans.There are a few instances in which we register new spans as children of a
io.opentracing.noop.NoopSpan. Unfortunately, when this happens, theOpenTelemetryShimattempts to turn the parentNoopSpaninto aSpanShim, which throws an exception. This issue can be mitigated by performing a noop if we attempt to register aNoopSpanas a parent. It appears that this was meant to be handled anyways, judging from the following TODO comment that already existed in the codebase:// TODO - Verify we handle a no-op SpanThis PR fixes this issue and provides a unit test to verify that it works correctly.