T
- the type of element signaledpublic class TracingPublisher<T> extends Object implements Publishers.MicronautPublisher<T>
Constructor and Description |
---|
TracingPublisher(Publisher<T> publisher,
io.opentracing.Tracer tracer)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(Publisher<T> publisher,
io.opentracing.Tracer tracer,
String operationName)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(Publisher<T> publisher,
io.opentracing.Tracer tracer,
io.opentracing.Tracer.SpanBuilder spanBuilder)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(Publisher<T> publisher,
io.opentracing.Tracer tracer,
io.opentracing.Tracer.SpanBuilder spanBuilder,
boolean isSingle)
Creates a new tracing publisher for the given arguments.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doOnError(Throwable throwable,
io.opentracing.Span span)
Designed for subclasses to override and implement custom on error behaviour.
|
protected void |
doOnFinish(io.opentracing.Span span)
Designed for subclasses to override and implement custom on finish behaviour.
|
protected void |
doOnNext(T object,
io.opentracing.Span span)
Designed for subclasses to override and implement custom behaviour when an item is emitted.
|
protected void |
doOnSubscribe(io.opentracing.Span span)
Designed for subclasses to override and implement custom on subscribe behaviour.
|
protected boolean |
isContinued()
Designed for subclasses to override if the current active span is to be continued by this publisher.
|
protected boolean |
isFinishOnError()
Designed for subclasses to override if the span needs to be finished upon error.
|
void |
subscribe(Subscriber<? super T> actual) |
public TracingPublisher(Publisher<T> publisher, io.opentracing.Tracer tracer, String operationName)
publisher
- The target publishertracer
- The traceroperationName
- The operation name that should be startedpublic TracingPublisher(Publisher<T> publisher, io.opentracing.Tracer tracer)
publisher
- The target publishertracer
- The tracerpublic TracingPublisher(Publisher<T> publisher, io.opentracing.Tracer tracer, io.opentracing.Tracer.SpanBuilder spanBuilder)
publisher
- The target publishertracer
- The tracerspanBuilder
- The span builder that represents the span that will be created when the publisher is subscribed topublic TracingPublisher(Publisher<T> publisher, io.opentracing.Tracer tracer, io.opentracing.Tracer.SpanBuilder spanBuilder, boolean isSingle)
publisher
- The target publishertracer
- The tracerspanBuilder
- The span builder that represents the span that will be created when the publisher is subscribed toisSingle
- Does the publisher emit a single itempublic void subscribe(Subscriber<? super T> actual)
protected boolean isContinued()
protected boolean isFinishOnError()
protected void doOnNext(@NonNull T object, @NonNull io.opentracing.Span span)
object
- The objectspan
- The spanprotected void doOnSubscribe(@NonNull io.opentracing.Span span)
span
- The spanprotected void doOnFinish(@NonNull io.opentracing.Span span)
Span.finish()
.span
- The span