Class MicrometerObservationCollectorBuilder

java.lang.Object
com.rabbitmq.stream.observation.micrometer.MicrometerObservationCollectorBuilder

public class MicrometerObservationCollectorBuilder extends Object
Builder to configure and create Micrometer Observation implementation of ObservationCollector.
Since:
0.12.0
  • Constructor Details

    • MicrometerObservationCollectorBuilder

      public MicrometerObservationCollectorBuilder()
  • Method Details

    • registry

      public MicrometerObservationCollectorBuilder registry(io.micrometer.observation.ObservationRegistry registry)
      Set the ObservationRegistry 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:
      • ObservationDocumentation.observation(ObservationConvention, ObservationConvention, Supplier, ObservationRegistry)
    • 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:
      • ObservationDocumentation.observation(ObservationConvention, ObservationConvention, Supplier, ObservationRegistry)
    • 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:
      • ObservationDocumentation.observation(ObservationConvention, ObservationConvention, Supplier, ObservationRegistry)
    • 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:
      • ObservationDocumentation.observation(ObservationConvention, ObservationConvention, Supplier, ObservationRegistry)
    • build

      public ObservationCollector<io.micrometer.observation.Observation> build()
      Create the Micrometer ObservationCollector.
      Returns:
      the Micrometer observation collector