Class LoggingMeterRegistryFactory
java.lang.Object
org.apache.accumulo.core.spi.metrics.LoggingMeterRegistryFactory
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.metrics.MeterRegistryFactory
MeterRegistryFactory.InitParameters -
Field Summary
Fields inherited from interface org.apache.accumulo.core.spi.metrics.MeterRegistryFactory
METRICS_PROP_SUBSTRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.micrometer.core.instrument.MeterRegistryCalled on metrics initialization.
-
Constructor Details
-
LoggingMeterRegistryFactory
public LoggingMeterRegistryFactory()
-
-
Method Details
-
create
public io.micrometer.core.instrument.MeterRegistry create(MeterRegistryFactory.InitParameters params) Description copied from interface:MeterRegistryFactoryCalled 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:
createin interfaceMeterRegistryFactory- Returns:
- a Micrometer registry that will be added to the metrics configuration.
-