@Singleton @Requires(beans=io.opentracing.Tracer.class) @Requires(beans=TracingWrapper.class) public class TracingRunnableInstrumenter extends Object implements Function<Runnable,Runnable>, RunnableInstrumenter, ReactiveInstrumenter
Constructor and Description |
---|
TracingRunnableInstrumenter(io.opentracing.Tracer tracer,
TracingWrapper tracingWrapper)
Create a function that wraps an existing Runnable.
|
Modifier and Type | Method and Description |
---|---|
Runnable |
apply(Runnable runnable) |
Runnable |
instrument(Runnable command)
Implementors can override to instrument a Runnable.
|
Optional<RunnableInstrumenter> |
newInstrumentation()
An optional instrumentation.
|
public TracingRunnableInstrumenter(io.opentracing.Tracer tracer, TracingWrapper tracingWrapper)
tracer
- For detecting tracingtracingWrapper
- For wrapping runnablepublic Runnable instrument(Runnable command)
RunnableInstrumenter
instrument
in interface RunnableInstrumenter
command
- The command to instrumentpublic Optional<RunnableInstrumenter> newInstrumentation()
ReactiveInstrumenter
newInstrumentation
in interface ReactiveInstrumenter