Class MicrometerRemoteCacheManagerMetricsRegistry.Builder
java.lang.Object
org.infinispan.client.hotrod.metrics.micrometer.MicrometerRemoteCacheManagerMetricsRegistry.Builder
- Enclosing class:
MicrometerRemoteCacheManagerMetricsRegistry
Creates a new
MicrometerRemoteCacheManagerMetricsRegistry
instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create a newMicrometerRemoteCacheManagerMetricsRegistry
with this configuration.Removes all Micrometer tags registered bywithTag(String, String)
withHistograms
(boolean enabled) Enables or disables histograms.withPrefix
(String prefix) Prefixes all metrics name withprefix
.Adds a Micrometer Tag to all metrics.
-
Constructor Details
-
Builder
public Builder(io.micrometer.core.instrument.MeterRegistry registry)
-
-
Method Details
-
withPrefix
Prefixes all metrics name withprefix
.If
null
, all metrics have the prefix"client.hotrod"
.- Parameters:
prefix
- The prefix to use in all metrics name. Can be null.- Returns:
- This instance.
-
withTag
Adds a Micrometer Tag to all metrics.This method can be invoked more than once.
Use the
clearTags()
to remove all custom tags.- Parameters:
tagName
- The tag's name.tagValue
- The tag's value.- Returns:
- This instance.
-
clearTags
Removes all Micrometer tags registered bywithTag(String, String)
- Returns:
- This instance.
-
withHistograms
Enables or disables histograms.When enabled, Micrometer exposes the histogram percentiles.
Collecting and exposing buckets may be expensive and affect the Hot Rod client performance.
- Parameters:
enabled
- Set totrue
to enabled buckets to be exposed.- Returns:
- This instance.
-
build
Create a newMicrometerRemoteCacheManagerMetricsRegistry
with this configuration.- Returns:
- The new
MicrometerRemoteCacheManagerMetricsRegistry
instance.
-