Package org.infinispan.metrics.impl
Interface CustomMetricsSupplier
- All Known Subinterfaces:
TakeOfflineManager
- All Known Implementing Classes:
DefaultTakeOfflineManager,NoOpTakeOfflineManager,RpcManagerImpl,XSiteAdminOperations
public interface CustomMetricsSupplier
Interface to implement if the class want to register more metrics to Micrometer than the methods annotated with
ManagedAttribute.
The main goal is to allow some dynamic metrics (i.e. metrics that depends on some configuration). As an example, the Cross-Site response time for each configured site.
MetricUtils.createGauge(String, String, Function, Map) or
MetricUtils.createTimer(String, String, BiConsumer, java.util.Map) can be used to create this custom
metrics.
- Since:
- 13.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionCollection<org.infinispan.commons.stat.MetricInfo> getCustomMetrics(boolean nameAsTag) Extra metrics to be registered.
-
Method Details
-
getCustomMetrics
Extra metrics to be registered.These can be dynamic metrics that cannot use
ManagedAttributeannotation. Extra tags can be set inMBeanMetadata.AttributeMetadata.- Parameters:
nameAsTag- True if the cache name or any other identifier must be set as Tags instead of metric name.- Returns:
- A list of
MBeanMetadata.AttributeMetadatato be registered.
-