Package io.micrometer.observation
Class ObservationHandler.AllMatchingCompositeObservationHandler
java.lang.Object
io.micrometer.observation.ObservationHandler.AllMatchingCompositeObservationHandler
- All Implemented Interfaces:
ObservationHandler<Observation.Context>,ObservationHandler.CompositeObservationHandler
- Enclosing interface:
ObservationHandler<T extends Observation.Context>
public static class ObservationHandler.AllMatchingCompositeObservationHandler
extends Object
implements ObservationHandler.CompositeObservationHandler
Handler picking all matching handlers from the list.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micrometer.observation.ObservationHandler
ObservationHandler.AllMatchingCompositeObservationHandler, ObservationHandler.CompositeObservationHandler, ObservationHandler.FirstMatchingCompositeObservationHandler -
Constructor Summary
ConstructorsConstructorDescriptionAllMatchingCompositeObservationHandler(ObservationHandler<? extends Observation.Context>... handlers) Creates a new instance ofAllMatchingCompositeObservationHandler.AllMatchingCompositeObservationHandler(List<? extends ObservationHandler<? extends Observation.Context>> handlers) Creates a new instance ofAllMatchingCompositeObservationHandler. -
Method Summary
Modifier and TypeMethodDescriptionReturns the registered handlers.voidonError(Observation.Context context) Reacts to an error during anObservation.voidonEvent(Observation.Event event, Observation.Context context) Reacts to arbitraryObservation.Event.voidonScopeClosed(Observation.Context context) Reacts to closing of anObservation.Scope.voidonScopeOpened(Observation.Context context) Reacts to opening of anObservation.Scope.voidonStart(Observation.Context context) Reacts to starting of anObservation.voidonStop(Observation.Context context) Reacts to stopping of anObservation.booleansupportsContext(Observation.Context context) Tells the registry whether this handler should be applied for a givenObservation.Context.
-
Constructor Details
-
AllMatchingCompositeObservationHandler
@SafeVarargs public AllMatchingCompositeObservationHandler(ObservationHandler<? extends Observation.Context>... handlers) Creates a new instance ofAllMatchingCompositeObservationHandler.- Parameters:
handlers- the handlers that are registered under the composite
-
AllMatchingCompositeObservationHandler
public AllMatchingCompositeObservationHandler(List<? extends ObservationHandler<? extends Observation.Context>> handlers) Creates a new instance ofAllMatchingCompositeObservationHandler.- Parameters:
handlers- the handlers that are registered under the composite
-
-
Method Details
-
getHandlers
Description copied from interface:ObservationHandler.CompositeObservationHandlerReturns the registered handlers.- Specified by:
getHandlersin interfaceObservationHandler.CompositeObservationHandler- Returns:
- registered handlers
-
onStart
Description copied from interface:ObservationHandlerReacts to starting of anObservation.- Specified by:
onStartin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context
-
onError
Description copied from interface:ObservationHandlerReacts to an error during anObservation.- Specified by:
onErrorin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context
-
onEvent
Description copied from interface:ObservationHandlerReacts to arbitraryObservation.Event.- Specified by:
onEventin interfaceObservationHandler<Observation.Context>- Parameters:
event- theObservation.Eventthat was signaledcontext- anObservation.Context
-
onScopeOpened
Description copied from interface:ObservationHandlerReacts to opening of anObservation.Scope.- Specified by:
onScopeOpenedin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context
-
onScopeClosed
Description copied from interface:ObservationHandlerReacts to closing of anObservation.Scope.- Specified by:
onScopeClosedin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context
-
onStop
Description copied from interface:ObservationHandlerReacts to stopping of anObservation.- Specified by:
onStopin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context
-
supportsContext
Description copied from interface:ObservationHandlerTells the registry whether this handler should be applied for a givenObservation.Context.- Specified by:
supportsContextin interfaceObservationHandler<Observation.Context>- Parameters:
context- anObservation.Context- Returns:
truewhen this handler should be used
-