Class PropagatingReceiverTracingObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>
java.lang.Object
io.micrometer.tracing.handler.PropagatingReceiverTracingObservationHandler<T>
- All Implemented Interfaces:
io.micrometer.observation.ObservationHandler<T>, TracingObservationHandler<T>
public class PropagatingReceiverTracingObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>
extends Object
implements TracingObservationHandler<T>
A
TracingObservationHandler called when receiving 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
ConstructorsConstructorDescriptionPropagatingReceiverTracingObservationHandler(Tracer tracer, Propagator propagator) Creates a new instance ofPropagatingReceiverTracingObservationHandler. -
Method Summary
Modifier and TypeMethodDescriptioncustomizeExtractedSpan(T context, Span.Builder builder) Customizes the extracted span (e.g.voidcustomizeReceiverSpan(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
-
PropagatingReceiverTracingObservationHandler
Creates a new instance ofPropagatingReceiverTracingObservationHandler.- Parameters:
tracer- the tracer to use to record eventspropagator- the mechanism to propagate tracing information from the carrier
-
-
Method Details
-
onStart
-
customizeExtractedSpan
Customizes the extracted span (e.g. you can set theSpan.KindviaSpan.Builder.kind(Span.Kind)).- Parameters:
context- contextbuilder- span builder- Returns:
- span builder
-
onError
- Specified by:
onErrorin interfaceio.micrometer.observation.ObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>- Specified by:
onErrorin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>
-
onStop
-
customizeReceiverSpan
-
supportsContext
public boolean supportsContext(io.micrometer.observation.Observation.Context context) - Specified by:
supportsContextin interfaceio.micrometer.observation.ObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>- Specified by:
supportsContextin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>
-
getTracer
Description copied from interface:TracingObservationHandlerReturns theTracer.- Specified by:
getTracerin interfaceTracingObservationHandler<T extends io.micrometer.observation.transport.ReceiverContext>- Returns:
- tracer
-