T
- the type of element signaledR
- the type of request elementpublic class OpenTelemetryPublisher<T,R>
extends java.lang.Object
implements io.micronaut.core.async.publisher.Publishers.MicronautPublisher<T>
Modifier and Type | Class and Description |
---|---|
protected class |
OpenTelemetryPublisher.TracingSubscriber
The tracing subscriber.
|
Modifier and Type | Field and Description |
---|---|
protected org.reactivestreams.Publisher<T> |
publisher |
Constructor and Description |
---|
OpenTelemetryPublisher(org.reactivestreams.Publisher<T> publisher,
io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<R,java.lang.Object> instrumenter,
io.opentelemetry.context.Context parentContext,
R request,
OpenTelemetryObserver<T> observer) |
Modifier and Type | Method and Description |
---|---|
protected void |
doSubscribe(org.reactivestreams.Subscriber<? super T> actual,
io.opentelemetry.context.Context context)
Do subscribe to the publisher.
|
void |
subscribe(org.reactivestreams.Subscriber<? super T> actual) |
protected final org.reactivestreams.Publisher<T> publisher
public OpenTelemetryPublisher(org.reactivestreams.Publisher<T> publisher, io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<R,java.lang.Object> instrumenter, io.opentelemetry.context.Context parentContext, @Nullable R request, OpenTelemetryObserver<T> observer)
publisher
- the target publisherinstrumenter
- the instrumenterparentContext
- the context from a parentrequest
- the request objectobserver
- 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.opentelemetry.context.Context context)
actual
- The actual subscribercontext
- The context