Alternative java thread-local ScopeManager

85 views
Skip to first unread message

Milan Mimica

unread,
Aug 30, 2019, 1:11:23 PM8/30/19
to OpenTracing
Hello

Can I get your opinion on this thread-local scope implementation: https://pastebin.com/sFbgjVSj
Does is comply to the standard?
I find it much more easy to understand than current io.opentracing.util.ThreadLocalScopeManager and, more importantly, it has the benefit of the thread-local reference being immutable. This allows for easy cooperation with kotlin coroutines.

CoroutinesScope(GlobalTracer.get().scopeManager().tlsScope.asContextElement()) and voila! Coroutines context-local tracing.

Reply all
Reply to author
Forward
0 new messages