public final class MeterRegistryHolder extends Object implements MeterRegistry
MeterRegistry
MeterRegistry.Config, MeterRegistry.More
Constructor and Description |
---|
MeterRegistryHolder(String dimensionalNamePrefix,
MeterRegistry registry)
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
MeterRegistry.Config |
config() |
Counter |
counter(Meter.Id id)
Only used by
Counter.builder(String) . |
void |
deregisterAll()
Deregister all meters held by this object.
|
void |
deregisterMatching(MeterFilter filter)
Deregister meters matching the provided filter.
|
<T> Gauge |
gauge(Meter.Id id,
T obj,
ToDoubleFunction<T> valueFunction)
Only used by
Gauge.builder(String, Object, ToDoubleFunction) . |
List<Meter> |
getMeters() |
MeterRegistryHolder |
hierarchicalNamePrefix(String value)
Add a hierarchical name prefix for this
MeterRegistryHolder . |
MeterRegistry.More |
more()
Access to less frequently used meter types and patterns.
|
Meter |
register(Meter.Id id,
Meter.Type type,
Iterable<Measurement> measurements)
Register a custom meter type.
|
DistributionSummary |
summary(Meter.Id id,
HistogramConfig histogramConfig)
Only used by
DistributionSummary.builder(String) . |
MeterRegistryHolder |
tag(String key,
String value)
Adds a tag that will be automatically added to all meters registered against this meter registry.
|
Timer |
timer(Meter.Id id,
HistogramConfig histogramConfig,
PauseDetector pauseDetectorOverride)
Only used by
Timer.builder(String) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
find, forEachMeter, get
public MeterRegistryHolder(String dimensionalNamePrefix, MeterRegistry registry)
dimensionalNamePrefix
- prefix for the dimensional metric names.
It will be used as a prefix for the hierarchical metric names unless a specific hierarchical
name prefix is specified through hierarchicalNamePrefix(String)
.registry
- the decorated registrypublic MeterRegistryHolder tag(String key, String value)
key
- the tag's keyvalue
- the tag's valuepublic MeterRegistryHolder hierarchicalNamePrefix(String value)
MeterRegistryHolder
.value
- the value for the hierarchical namepublic Counter counter(Meter.Id id)
MeterRegistry
Counter.builder(String)
.counter
in interface MeterRegistry
id
- The identifier for this counter.public <T> Gauge gauge(Meter.Id id, T obj, ToDoubleFunction<T> valueFunction)
MeterRegistry
Gauge.builder(String, Object, ToDoubleFunction)
.gauge
in interface MeterRegistry
T
- The type of the state object from which the gauge value is extracted.id
- The identifier for this gauge.obj
- State object used to compute a value.valueFunction
- Function that is applied on the value for the number.public Timer timer(Meter.Id id, HistogramConfig histogramConfig, PauseDetector pauseDetectorOverride)
MeterRegistry
Timer.builder(String)
.timer
in interface MeterRegistry
id
- The identifier for this timer.histogramConfig
- Configuration that governs how distribution statistics are computed.public DistributionSummary summary(Meter.Id id, HistogramConfig histogramConfig)
MeterRegistry
DistributionSummary.builder(String)
.summary
in interface MeterRegistry
id
- The identifier for this distribution summary.histogramConfig
- Configuration that governs how distribution statistics are computed.public Meter register(Meter.Id id, Meter.Type type, Iterable<Measurement> measurements)
MeterRegistry
register
in interface MeterRegistry
id
- Id of the meter being registered.type
- Meter type, which may be used by naming conventions to normalize the name.measurements
- A sequence of measurements describing how to sample the meter.public void deregisterMatching(MeterFilter filter)
MeterRegistry
deregisterMatching
in interface MeterRegistry
filter
- a non-null meter filterpublic void deregisterAll()
public MeterRegistry.Config config()
config
in interface MeterRegistry
public MeterRegistry.More more()
MeterRegistry
more
in interface MeterRegistry
public List<Meter> getMeters()
getMeters
in interface MeterRegistry
Copyright 2011-2017 ForgeRock AS.