-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle noop correctly #4968
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. |
opentracing-shim/src/test/java/io/opentelemetry/opentracingshim/SpanBuilderShimTest.java
Outdated
Show resolved
Hide resolved
@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, theOpenTelemetryShim
attempts to turn the parentNoopSpan
into aSpanShim
, which throws an exception. This issue can be mitigated by performing a noop if we attempt to register aNoopSpan
as 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 Span
This PR fixes this issue and provides a unit test to verify that it works correctly.