Class PropagatingSenderTracingObservationHandler<T extends io.micrometer.observation.transport.SenderContext>
java.lang.Object
io.micrometer.tracing.handler.PropagatingSenderTracingObservationHandler<T>
- All Implemented Interfaces:
io.micrometer.observation.ObservationHandler<T>, TracingObservationHandler<T>
public class PropagatingSenderTracingObservationHandler<T extends io.micrometer.observation.transport.SenderContext>
extends Object
implements TracingObservationHandler<T>
A
TracingObservationHandler called when sending occurred - e.g. of messages or
http requests.- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.observation.ObservationHandler
io.micrometer.observation.ObservationHandler.AllMatchingCompositeObservationHandler, io.micrometer.observation.ObservationHandler.CompositeObservationHandler, io.micrometer.observation.ObservationHandler.FirstMatchingCompositeObservationHandlerNested classes/interfaces inherited from interface TracingObservationHandler
TracingObservationHandler.TracingContext -
Constructor Summary
ConstructorsConstructorDescriptionPropagatingSenderTracingObservationHandler(Tracer tracer, Propagator propagator) Creates a new instance ofPropagatingSenderTracingObservationHandler. -
Method Summary
Modifier and TypeMethodDescriptioncreateSenderSpan(T context) Method to be used to create a sender span.voidcustomizeSenderSpan(T context, Span span) Allows to customize the receiver span before reporting it.Returns theTracer.voidvoidvoidbooleansupportsContext(io.micrometer.observation.Observation.Context context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TracingObservationHandler
endSpan, getParentSpan, getRequiredSpan, getSpanName, getTracingContext, onEvent, onScopeClosed, onScopeOpened, onScopeReset, setMaybeScopeOnTracingContext, tagSpan
-
Constructor Details
-
PropagatingSenderTracingObservationHandler
Creates a new instance ofPropagatingSenderTracingObservationHandler.- Parameters:
tracer- the tracer to use to record eventspropagator- the mechanism to propagate tracing information into the carrier
-
-
Method Details
-
onStart
-
createSenderSpan
-
onError
- Specified by:
onErrorin interfaceio.micrometer.observation.ObservationHandler<T extends io.micrometer.observation.transport.SenderContext>- Specified by:
onErrorin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.SenderContext>
-
onStop
-
customizeSenderSpan
-
supportsContext
public boolean supportsContext(io.micrometer.observation.Observation.Context context) - Specified by:
supportsContextin interfaceio.micrometer.observation.ObservationHandler<T extends io.micrometer.observation.transport.SenderContext>- Specified by:
supportsContextin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.SenderContext>
-
getTracer
Description copied from interface:TracingObservationHandlerReturns theTracer.- Specified by:
getTracerin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.SenderContext>- Returns:
- tracer
-