Class CompositeMeterRegistryConfigurer

java.lang.Object
io.micronaut.configuration.metrics.aggregator.CompositeMeterRegistryConfigurer
All Implemented Interfaces:
MeterRegistryConfigurer<io.micrometer.core.instrument.composite.CompositeMeterRegistry>

public class CompositeMeterRegistryConfigurer extends Object implements MeterRegistryConfigurer<io.micrometer.core.instrument.composite.CompositeMeterRegistry>
Default implementation of MeterRegistryConfigurer that adds the binders and filters to the micrometer meter registry. This is specifically needed for the MetricsEndpoint
Since:
1.0
Author:
Christian Oestreich
  • Constructor Details

    • CompositeMeterRegistryConfigurer

      public CompositeMeterRegistryConfigurer(Collection<io.micrometer.core.instrument.binder.MeterBinder> binders, Collection<io.micrometer.core.instrument.config.MeterFilter> filters)
      Constructor for the micrometer meter registry configurer.
      Parameters:
      binders - binder beans
      filters - filter beans
  • Method Details

    • configure

      public void configure(@NonNull @NonNull io.micrometer.core.instrument.composite.CompositeMeterRegistry meterRegistry)
      Configures a meter registry with binders, filters, etc.

      It is Important that filters are the first thing added so that subsequent operations are appropriately filtered.

      Specified by:
      configure in interface MeterRegistryConfigurer<io.micrometer.core.instrument.composite.CompositeMeterRegistry>
      Parameters:
      meterRegistry - Meter registry to bind metrics to.
    • getType

      public Class<io.micrometer.core.instrument.composite.CompositeMeterRegistry> getType()
      Specified by:
      getType in interface MeterRegistryConfigurer<io.micrometer.core.instrument.composite.CompositeMeterRegistry>
      Returns:
      the type parameter