Class LoggingMeterRegistryFactory

java.lang.Object
org.apache.accumulo.core.spi.metrics.LoggingMeterRegistryFactory
All Implemented Interfaces:
MeterRegistryFactory

public class LoggingMeterRegistryFactory extends Object implements MeterRegistryFactory
Example implementation of enabling a metrics provider by implementing the MeterRegistryFactory interface. When enabled though properties by enabling Property.GENERAL_MICROMETER_ENABLED and providing this class for the Property.GENERAL_MICROMETER_FACTORY

The metrics will appear in the normal service logs with a named logger of org.apache.accumulo.METRICS at the INFO level. The metrics output can be directed to a file using standard logging configuration properties by configuring the log4j2-service.properties file.

Properties can be passed in the Accumulo properties files using the prefix general.custom.metrics.opts

For example, the default polling rate is 60 sec. To modify the update frequency set general.custom.metrics.opts.logging.step in the Accumulo configuration.

     general.custom.metrics.opts.logging.step = 10s
 
  • Constructor Details

    • LoggingMeterRegistryFactory

      public LoggingMeterRegistryFactory()
  • Method Details

    • create

      public io.micrometer.core.instrument.MeterRegistry create(MeterRegistryFactory.InitParameters params)
      Description copied from interface: MeterRegistryFactory
      Called on metrics initialization. Implementations should note the initial parameters set when instantiating a MeterRegistry should be considered fixed. Once a MeterRegistry is initialized parameters such as common tags may not be updated with later additions or changes.
      Specified by:
      create in interface MeterRegistryFactory
      Returns:
      a Micrometer registry that will be added to the metrics configuration.