ThreadLocalActiveSpan.deactivate()
See original GitHub issueThreadLocalActiveSpan.deactivate()
does not deactivate/finish span when it is not currently active span:
https://github.com/opentracing/opentracing-java/blob/master/opentracing-util/src/main/java/io/opentracing/util/ThreadLocalActiveSpan.java#L50
Problems:
- response interceptors sometimes run in a different thread, therefore it makes it impossible to deactivate the span (e.g. async jax-rs)
- if a user accidentally does not deactivate local span, span created by instrumentation is not finished
I would like to see what others think and what issues they faced.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to leave/exit/deactivate a Python virtualenv - Stack Overflow
Just type "workon" with no arguments and hit enter. The command to leave is "deactivate", as answered below. – Dannid. Oct 7, 2014...
Read more >ActiveSpan (io.opentracing:opentracing-v030 0.0.4 API) - mvndoc.com
Mark the end of the active period for the current thread and ActiveSpan . When the last ActiveSpan is deactivated for a given...
Read more >BaseSpan (io.opentracing:opentracing-v030 0.0.4 API) - Javadoc ...
For those, either use Span.finish() or ActiveSpan.deactivate() depending on the programming model. See Also: Span , ActiveSpan , Tracer.SpanBuilder.
Read more >Activate, Reactivate, Deactivate your Virtualenv - Blog Post
Here's a quick guide to activate your virtual environment (Virtualenv) -- especially if you closed your terminal window (aka command prompt) ...
Read more >io.opentracing.ActiveSpan - Java Code Examples and tutorials
currentTimeMillis(), log(event. ... deactivate(); break; case EXECUTE_SUCCESS: deactivate(); break; ... ThreadLocalActiveSpan)6 Path (java.nio.file.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I came here tracking a span leak in test code - using MockTracer w/ThreadLocalActiveSpanSource - even without threads the current code has some fragility.
What I have going on is clearly a misuse of the API - and I’m going to be tracking that down now - but the silent leak was much less helpful than we could be.
I’d like to see an exception raised, or a diagnostic stacktrace logged or some such thing: leaking is pretty much the most difficult thing to deal with: its silent, it will cause traces to have bad parents and possibly even join distinct traces together.
Trying to prevent this Issue to become stale, a pair of things:
Unless somebody thinks this is still an issue, I will close it by the end of the next week. Let us know 😉
@pavolloffay @rbtcollins