Class TracingAwareMeterObservationHandler<T extends io.micrometer.observation.Observation.Context>
java.lang.Object
io.micrometer.tracing.handler.TracingAwareMeterObservationHandler<T>
- Type Parameters:
T- type of handler context
- All Implemented Interfaces:
io.micrometer.core.instrument.observation.MeterObservationHandler<T>, io.micrometer.observation.ObservationHandler<T>
public class TracingAwareMeterObservationHandler<T extends io.micrometer.observation.Observation.Context>
extends Object
implements io.micrometer.core.instrument.observation.MeterObservationHandler<T>
A
MeterObservationHandler that can wrap another one and makes the tracing data
available for it. This handler can be used in cases where the MeterRegistry or
the MeterObservationHandler itself needs access to the tracing data (e.g.:
exemplars).- 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.FirstMatchingCompositeObservationHandler -
Constructor Summary
ConstructorsConstructorDescriptionTracingAwareMeterObservationHandler(io.micrometer.core.instrument.observation.MeterObservationHandler<T> delegate, Tracer tracer) Creates a new instance ofTracingAwareMeterObservationHandler. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidonScopeClosed(T context) voidonScopeOpened(T context) voidvoidbooleansupportsContext(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 io.micrometer.observation.ObservationHandler
onScopeReset
-
Constructor Details
-
TracingAwareMeterObservationHandler
public TracingAwareMeterObservationHandler(io.micrometer.core.instrument.observation.MeterObservationHandler<T> delegate, Tracer tracer) Creates a new instance ofTracingAwareMeterObservationHandler.- Parameters:
delegate- aMeterObservationHandlerdelegatetracer- tracer
-
-
Method Details
-
onStart
-
onError
-
onEvent
-
onScopeOpened
-
onScopeClosed
-
onStop
-
supportsContext
public boolean supportsContext(io.micrometer.observation.Observation.Context context) - Specified by:
supportsContextin interfaceio.micrometer.core.instrument.observation.MeterObservationHandler<T extends io.micrometer.observation.Observation.Context>- Specified by:
supportsContextin interfaceio.micrometer.observation.ObservationHandler<T extends io.micrometer.observation.Observation.Context>
-