T - the type of element signaledpublic class TracingPublisher<T>
extends java.lang.Object
implements io.micronaut.core.async.publisher.Publishers.MicronautPublisher<T>
| Modifier and Type | Class and Description |
|---|---|
protected class |
TracingPublisher.TracingSubscriber
The tracing subscriber.
|
| Modifier and Type | Field and Description |
|---|---|
protected org.reactivestreams.Publisher<T> |
publisher |
| 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,
java.lang.String operationName,
TracingObserver tracingObserver)
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.
|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer,
io.opentracing.Tracer.SpanBuilder spanBuilder,
boolean isSingle,
TracingObserver tracingObserver)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer,
io.opentracing.Tracer.SpanBuilder spanBuilder,
TracingObserver tracingObserver)
Creates a new tracing publisher for the given arguments.
|
TracingPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentracing.Tracer tracer,
TracingObserver tracingObserver)
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 void |
doSubscribe(org.reactivestreams.Subscriber<? super T> actual,
io.opentracing.ScopeManager scopeManager,
io.opentracing.Span span,
boolean finishOnClose)
Do subscribe to the publisher.
|
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) |
protected final org.reactivestreams.Publisher<T> publisher
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, java.lang.String operationName, @NonNull TracingObserver tracingObserver)
publisher - the target publishertracer - the traceroperationName - the operation name that should be startedtracingObserver - the tracing observerpublic 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, @NonNull TracingObserver tracingObserver)
publisher - the target publishertracer - the tracertracingObserver - the tracing observerpublic 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 bepublic TracingPublisher(org.reactivestreams.Publisher<T> publisher, io.opentracing.Tracer tracer, io.opentracing.Tracer.SpanBuilder spanBuilder, @NonNull TracingObserver tracingObserver)
publisher - the target publishertracer - the tracerspanBuilder - the span builder that represents the span that will betracingObserver - the tracing observerpublic 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 - true if the publisher emits a single itempublic TracingPublisher(org.reactivestreams.Publisher<T> publisher, io.opentracing.Tracer tracer, io.opentracing.Tracer.SpanBuilder spanBuilder, boolean isSingle, @NonNull TracingObserver tracingObserver)
publisher - the target publishertracer - the tracerspanBuilder - the span builder that represents the span that will
be created when the publisher is subscribed toisSingle - true if the publisher emits a single itemtracingObserver - the tracing observerpublic void subscribe(org.reactivestreams.Subscriber<? super T> actual)
subscribe in interface org.reactivestreams.Publisher<T>@Internal protected void doSubscribe(org.reactivestreams.Subscriber<? super T> actual, io.opentracing.ScopeManager scopeManager, io.opentracing.Span span, boolean finishOnClose)
actual - The actual subscriberscopeManager - The scope managerspan - The spanfinishOnClose - Should finish on close?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