Skip to content

lucidsoftware/opentracing-thread-context

Repository files navigation

Opentracing thread-local propagation

Build Status Maven Version

In-process thread-local propagation of spans.

Usage

import io.opentracing.Span;
import io.opentracing.threadcontext.ThreadContextSpan;

Span span = ...
ThreadContextSpan.withSpan(span, () -> {
    ThreadContextSpan.get(); // current Span
});