Class DefaultMeterObservationHandler.Builder
java.lang.Object
io.micrometer.core.instrument.observation.DefaultMeterObservationHandler.Builder
- Enclosing class:
DefaultMeterObservationHandler
Builder for
DefaultMeterObservationHandler.- Since:
- 1.18.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aDefaultMeterObservationHandler.includeActiveObservationLongTaskTimer(boolean includeActiveObservationLongTaskTimer) Whether to create the active observationLongTaskTimer(named<observation-name>.active), which tracks the duration of in-progress Observations, in addition to theTimerrecorded when an Observation is stopped.
-
Method Details
-
includeActiveObservationLongTaskTimer
public DefaultMeterObservationHandler.Builder includeActiveObservationLongTaskTimer(boolean includeActiveObservationLongTaskTimer) Whether to create the active observationLongTaskTimer(named<observation-name>.active), which tracks the duration of in-progress Observations, in addition to theTimerrecorded when an Observation is stopped. Defaults tofalse.The deprecated
DefaultMeterObservationHandlerconstructors always create thisLongTaskTimer; set this totrueto keep that behavior when migrating to this builder.- Parameters:
includeActiveObservationLongTaskTimer- whether to create the active observationLongTaskTimer- Returns:
- this builder
-
build
Build aDefaultMeterObservationHandler.- Returns:
- a new
DefaultMeterObservationHandler
-