Package org.infinispan.metrics.impl
Interface CustomMetricsSupplier
- All Known Subinterfaces:
TakeOfflineManager
- All Known Implementing Classes:
CacheMgmtInterceptor,DefaultTakeOfflineManager,NoOpTakeOfflineManager,RpcManagerImpl,StatsCollector,TxInterceptor,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(GlobalMetricsConfiguration configuration) Extra metrics to be registered.
-
Method Details
-
getCustomMetrics
Collection<org.infinispan.commons.stat.MetricInfo> getCustomMetrics(GlobalMetricsConfiguration configuration) Extra metrics to be registered.These can be dynamic metrics that cannot use
ManagedAttributeannotation. Extra tags can be set inMBeanMetadata.AttributeMetadata.- Parameters:
configuration- TheGlobalMetricsConfiguration. Implementation can make decision based onGlobalMetricsConfiguration.namesAsTags()orGlobalMetricsConfiguration.histograms().- Returns:
- A list of
MBeanMetadata.AttributeMetadatato be registered.
-