Skip to content

Latest commit

 

History

History

opentracing-span-propagation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Maven Version OpenTracing Badge

OpenTracing Span propagation library

Adding the opentracing-span-propagation jar to your classpath is all that is needed to automatically obtain an active Span Scope from the GlobalTracer and become part of the ContextSnapshot.

How to use this library

Add it to your classpath.

<dependency>
    <groupId>nl.talsmasoftware.context</groupId>
    <artifactId>opentracing-span-propagation</artifactId>
    <version>[see Maven badge above]</version>
</dependency>

Done!

Now the GlobalTracer.get().activeSpan() is included in each snapshot created by the ContextManagers.createSnapshot() method and reactivated with it.
This includes all usages of the ContextAwareExecutorService.

Please note: All snapshot reactivate() results must be closed (from the same thread) if the opentracing-span-propagation is used due to the Opentracing Scope semantics, where each activated scope must be closed.
The ContextAwareExecutorService and other propagation utilities in this library conform to this constraint.