T - the type of element signaledpublic class TracingPublisher<T> extends java.lang.Object implements Publishers.MicronautPublisher<T>
| Constructor and Description |
|---|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer,
java.lang.String operationName)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer,
io.opentracing.Tracer.SpanBuilder spanBuilder)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(org.reactivestreams.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(java.lang.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(org.reactivestreams.Subscriber<? super T> actual) |
public TracingPublisher(org.reactivestreams.Publisher<T> publisher, io.opentracing.Tracer tracer, java.lang.String operationName)
publisher - The target publishertracer - The traceroperationName - The operation name that should be startedpublic TracingPublisher(org.reactivestreams.Publisher<T> publisher, io.opentracing.Tracer tracer)
publisher - The target publishertracer - The tracerpublic TracingPublisher(org.reactivestreams.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(org.reactivestreams.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(org.reactivestreams.Subscriber<? super T> actual)
subscribe in interface org.reactivestreams.Publisher<T>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 spanprotected void doOnError(@NonNull
java.lang.Throwable throwable,
@NonNull
io.opentracing.Span span)
throwable - The errorspan - The span