public class CompositeMeterRegistry extends MeterRegistry
MeterRegistry.Config, MeterRegistry.Moreclock| Constructor and Description |
|---|
CompositeMeterRegistry() |
CompositeMeterRegistry(Clock clock) |
CompositeMeterRegistry(Clock clock,
java.lang.Iterable<MeterRegistry> registries) |
| Modifier and Type | Method and Description |
|---|---|
CompositeMeterRegistry |
add(MeterRegistry registry) |
void |
close()
Closes this registry, releasing any resources in the process.
|
protected DistributionStatisticConfig |
defaultHistogramConfig()
Every custom registry implementation should define a default histogram expiry at a minimum:
|
protected java.util.concurrent.TimeUnit |
getBaseTimeUnit() |
java.util.Set<MeterRegistry> |
getRegistries() |
protected Counter |
newCounter(Meter.Id id)
Build a new counter to be added to the registry.
|
protected DistributionSummary |
newDistributionSummary(Meter.Id id,
DistributionStatisticConfig distributionStatisticConfig,
double scale)
Build a new distribution summary to be added to the registry.
|
protected <T> FunctionCounter |
newFunctionCounter(Meter.Id id,
T obj,
java.util.function.ToDoubleFunction<T> countFunction)
Build a new function counter to be added to the registry.
|
protected <T> FunctionTimer |
newFunctionTimer(Meter.Id id,
T obj,
java.util.function.ToLongFunction<T> countFunction,
java.util.function.ToDoubleFunction<T> totalTimeFunction,
java.util.concurrent.TimeUnit totalTimeFunctionUnits)
Build a new function timer to be added to the registry.
|
protected <T> Gauge |
newGauge(Meter.Id id,
T obj,
java.util.function.ToDoubleFunction<T> valueFunction)
Build a new gauge to be added to the registry.
|
protected LongTaskTimer |
newLongTaskTimer(Meter.Id id)
Build a new long task timer to be added to the registry.
|
protected Meter |
newMeter(Meter.Id id,
Meter.Type type,
java.lang.Iterable<Measurement> measurements)
Build a new custom meter to be added to the registry.
|
protected <T> TimeGauge |
newTimeGauge(Meter.Id id,
T obj,
java.util.concurrent.TimeUnit valueFunctionUnit,
java.util.function.ToDoubleFunction<T> valueFunction)
Build a new time gauge to be added to the registry.
|
protected Timer |
newTimer(Meter.Id id,
DistributionStatisticConfig distributionStatisticConfig,
PauseDetector pauseDetector)
Build a new timer to be added to the registry.
|
CompositeMeterRegistry |
remove(MeterRegistry registry) |
config, counter, counter, find, forEachMeter, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, get, getConventionName, getConventionTags, getMeters, isClosed, more, summary, summary, timer, timerpublic CompositeMeterRegistry()
public CompositeMeterRegistry(Clock clock)
public CompositeMeterRegistry(Clock clock, java.lang.Iterable<MeterRegistry> registries)
protected Timer newTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig, PauseDetector pauseDetector)
MeterRegistrynewTimer in class MeterRegistryid - The id that uniquely identifies the timer.distributionStatisticConfig - Configuration for published distribution statistics.pauseDetector - The pause detector to use for coordinated omission compensation.protected DistributionSummary newDistributionSummary(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig, double scale)
MeterRegistrynewDistributionSummary in class MeterRegistryid - The id that uniquely identifies the distribution summary.distributionStatisticConfig - Configuration for published distribution statistics.scale - Multiply every recorded sample by this factor.protected Counter newCounter(Meter.Id id)
MeterRegistrynewCounter in class MeterRegistryid - The id that uniquely identifies the counter.protected LongTaskTimer newLongTaskTimer(Meter.Id id)
MeterRegistrynewLongTaskTimer in class MeterRegistryid - The id that uniquely identifies the long task timer.protected <T> Gauge newGauge(Meter.Id id, @Nullable T obj, java.util.function.ToDoubleFunction<T> valueFunction)
MeterRegistrynewGauge in class MeterRegistryT - The type of the state object from which the gauge value is extracted.id - The id that uniquely identifies the gauge.obj - State object used to compute a value.valueFunction - Function that is applied on the value for the number.protected <T> TimeGauge newTimeGauge(Meter.Id id, T obj, java.util.concurrent.TimeUnit valueFunctionUnit, java.util.function.ToDoubleFunction<T> valueFunction)
MeterRegistrynewTimeGauge in class MeterRegistryT - The type of the object upon which the value function derives a measurement.id - The id that uniquely identifies the time gauge.obj - The state object from which the value function derives a measurement.valueFunctionUnit - The base unit of time returned by the value function.valueFunction - A function returning a time value that can go up or down.protected <T> FunctionTimer newFunctionTimer(Meter.Id id, T obj, java.util.function.ToLongFunction<T> countFunction, java.util.function.ToDoubleFunction<T> totalTimeFunction, java.util.concurrent.TimeUnit totalTimeFunctionUnits)
MeterRegistrynewFunctionTimer in class MeterRegistryT - The type of the object upon which the value functions derives their measurements.id - The id that uniquely identifies the function timer.obj - The state object from which the count and total functions derive measurements.countFunction - A monotonically increasing count function.totalTimeFunction - A monotonically increasing total time function.totalTimeFunctionUnits - The base unit of time of the totals returned by the total time function.protected <T> FunctionCounter newFunctionCounter(Meter.Id id, T obj, java.util.function.ToDoubleFunction<T> countFunction)
MeterRegistrynewFunctionCounter in class MeterRegistryT - The type of the object upon which the value function derives a measurement.id - The id that uniquely identifies the function counter.obj - The state object from which the count function derives a measurement.countFunction - A monotonically increasing count function.protected java.util.concurrent.TimeUnit getBaseTimeUnit()
getBaseTimeUnit in class MeterRegistryprotected DistributionStatisticConfig defaultHistogramConfig()
MeterRegistry
DistributionStatisticConfig.builder()
.expiry(defaultStep)
.build()
.merge(DistributionStatisticConfig.DEFAULT);
defaultHistogramConfig in class MeterRegistryprotected Meter newMeter(Meter.Id id, Meter.Type type, java.lang.Iterable<Measurement> measurements)
MeterRegistrynewMeter in class MeterRegistryid - The id that uniquely identifies the custom meter.type - What kind of meter this is.measurements - A set of measurements describing how to sample this meter.public CompositeMeterRegistry add(MeterRegistry registry)
public CompositeMeterRegistry remove(MeterRegistry registry)
public java.util.Set<MeterRegistry> getRegistries()
public void close()
MeterRegistryclose in interface java.lang.AutoCloseableclose in class MeterRegistry