Class MicrometerObservationCollectorBuilder
java.lang.Object
com.rabbitmq.stream.observation.micrometer.MicrometerObservationCollectorBuilder
Builder to configure and create Micrometer
Observation implementation of
ObservationCollector
.- Since:
- 0.12.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionObservationCollector
<io.micrometer.observation.Observation> build()
Create the MicrometerObservationCollector
.customProcessObservationConvention
(ProcessObservationConvention customProcessObservationConvention) Custom convention for consuming.customPublishObservationConvention
(PublishObservationConvention customPublishObservationConvention) Custom convention for publishing.defaultProcessObservationConvention
(ProcessObservationConvention defaultProcessObservationConvention) Default convention for consuming.defaultPublishObservationConvention
(PublishObservationConvention defaultPublishObservationConvention) Default convention for publishing.registry
(io.micrometer.observation.ObservationRegistry registry) Set theObservationRegistry
to use.
-
Constructor Details
-
MicrometerObservationCollectorBuilder
public MicrometerObservationCollectorBuilder()
-
-
Method Details
-
registry
public MicrometerObservationCollectorBuilder registry(io.micrometer.observation.ObservationRegistry registry) Set theObservationRegistry
to use.Default is
ObservationRegistry.NOOP
.- Parameters:
registry
- the registry- Returns:
- this builder instance
-
customPublishObservationConvention
public MicrometerObservationCollectorBuilder customPublishObservationConvention(PublishObservationConvention customPublishObservationConvention) Custom convention for publishing.If not null, it will override any pre-configured conventions.
Default is
null
.- Parameters:
customPublishObservationConvention
- the convention- Returns:
- this builder instance
- See Also:
-
defaultPublishObservationConvention
public MicrometerObservationCollectorBuilder defaultPublishObservationConvention(PublishObservationConvention defaultPublishObservationConvention) Default convention for publishing.It will be picked if there was neither custom convention nor a pre-configured one via
ObservationRegistry
.Default is
DefaultPublishObservationConvention
.- Parameters:
defaultPublishObservationConvention
- the convention- Returns:
- this builder instance
- See Also:
-
customProcessObservationConvention
public MicrometerObservationCollectorBuilder customProcessObservationConvention(ProcessObservationConvention customProcessObservationConvention) Custom convention for consuming.If not null, it will override any pre-configured conventions.
Default is
null
.- Parameters:
customProcessObservationConvention
- the convention- Returns:
- this builder instance
- See Also:
-
defaultProcessObservationConvention
public MicrometerObservationCollectorBuilder defaultProcessObservationConvention(ProcessObservationConvention defaultProcessObservationConvention) Default convention for consuming.It will be picked if there was neither custom convention nor a pre-configured one via
ObservationRegistry
.Default is
DefaultProcessObservationConvention
.- Parameters:
defaultProcessObservationConvention
- the convention- Returns:
- this builder instance
- Since:
- 0.12.0
- See Also:
-
build
Create the MicrometerObservationCollector
.- Returns:
- the Micrometer observation collector
-