opentracing / opentracing-java

OpenTracing API for Java. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.68k stars 344 forks source link

Missing ScopeManager.active() method #374

Closed rupinder10 closed 4 years ago

rupinder10 commented 4 years ago

I have java code that starts a span in one call and then later in time has to finish it. The code to finish it has the following structure:

span.finish(time); tracer.scopeManager().active().close();

This code works fine with opentracing-api version 0.31 but the active() method has been removed from ScopeManager in version 0.33.

This causes the spans to not show up properly.

pavolloffay commented 4 years ago

Yes, some methods have been first deprecated in 0.32.0 and removed in 0.33.0. These APIs were problematic and causing issues.

In the new API it's expected that execution thread holds scope and closes it properly.

As this is not a bug I am it.