public abstract class AbstractMeterRegistry extends java.lang.Object implements MeterRegistry
MeterRegistry.Config, MeterRegistry.More, MeterRegistry.Search| Constructor and Description |
|---|
AbstractMeterRegistry(Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
MeterRegistry.Config |
config()
Access to configuration options for this registry.
|
Counter |
counter(Meter.Id id)
Tracks a monotonically increasing value.
|
Meter.Id |
createId(java.lang.String name,
java.lang.Iterable<Tag> tag,
java.lang.String description,
java.lang.String baseUnit) |
MeterRegistry.Search |
find(java.lang.String name) |
<T> Gauge |
gauge(Meter.Id id,
T obj,
java.util.function.ToDoubleFunction<T> f)
Register a gauge that reports the value of the object after the function
f is applied. |
java.util.Collection<Meter> |
getMeters() |
MeterRegistry.More |
more()
Access to less frequently used meter types and patterns.
|
protected abstract Counter |
newCounter(Meter.Id id) |
protected abstract DistributionSummary |
newDistributionSummary(Meter.Id id,
Histogram.Builder<?> histogram,
Quantiles quantiles) |
protected abstract <T> Gauge |
newGauge(Meter.Id id,
T obj,
java.util.function.ToDoubleFunction<T> f) |
protected abstract LongTaskTimer |
newLongTaskTimer(Meter.Id id) |
protected abstract void |
newMeter(Meter.Id id,
Meter.Type type,
java.lang.Iterable<Measurement> measurements) |
protected abstract <T> Gauge |
newTimeGauge(Meter.Id id,
T obj,
java.util.concurrent.TimeUnit fUnit,
java.util.function.ToDoubleFunction<T> f) |
protected abstract Timer |
newTimer(Meter.Id id,
Histogram.Builder<?> histogram,
Quantiles quantiles) |
Meter |
register(Meter.Id id,
Meter.Type type,
java.lang.Iterable<Measurement> measurements)
Register a custom meter type.
|
DistributionSummary |
summary(Meter.Id id,
Histogram.Builder<?> histogram,
Quantiles quantiles)
Measures the sample distribution of events.
|
Timer |
timer(Meter.Id id,
Histogram.Builder<?> histogram,
Quantiles quantiles)
Measures the time taken for short tasks and the count of these tasks.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcounter, counter, createId, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, summary, summary, timer, timerprotected final Clock clock
public AbstractMeterRegistry(Clock clock)
public MeterRegistry.Config config()
MeterRegistryconfig in interface MeterRegistryprotected abstract <T> Gauge newGauge(Meter.Id id, T obj, java.util.function.ToDoubleFunction<T> f)
protected abstract LongTaskTimer newLongTaskTimer(Meter.Id id)
protected abstract Timer newTimer(Meter.Id id, Histogram.Builder<?> histogram, Quantiles quantiles)
protected abstract DistributionSummary newDistributionSummary(Meter.Id id, Histogram.Builder<?> histogram, Quantiles quantiles)
protected abstract void newMeter(Meter.Id id, Meter.Type type, java.lang.Iterable<Measurement> measurements)
protected abstract <T> Gauge newTimeGauge(Meter.Id id, T obj, java.util.concurrent.TimeUnit fUnit, java.util.function.ToDoubleFunction<T> f)
public Meter register(Meter.Id id, Meter.Type type, java.lang.Iterable<Measurement> measurements)
MeterRegistryregister in interface MeterRegistryid - 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 Counter counter(Meter.Id id)
MeterRegistrycounter in interface MeterRegistrypublic <T> Gauge gauge(Meter.Id id, T obj, java.util.function.ToDoubleFunction<T> f)
MeterRegistryf is applied. The registration will keep a weak reference to the object so it will
not prevent garbage collection. Applying f on the object should be thread safe.
If multiple gauges are registered with the same id, then the values will be aggregated and the sum will be reported. For example, registering multiple gauges for active threads in a thread pool with the same id would produce a value that is the overall number of active threads. For other behaviors, manage it on the user side and avoid multiple registrations.
gauge in interface MeterRegistryid - Id of the gauge being registered.obj - Object used to compute a value.f - Function that is applied on the value for the number.public Timer timer(Meter.Id id, Histogram.Builder<?> histogram, Quantiles quantiles)
MeterRegistrytimer in interface MeterRegistrypublic DistributionSummary summary(Meter.Id id, Histogram.Builder<?> histogram, Quantiles quantiles)
MeterRegistrysummary in interface MeterRegistrypublic MeterRegistry.More more()
MeterRegistrymore in interface MeterRegistrypublic MeterRegistry.Search find(java.lang.String name)
find in interface MeterRegistrypublic java.util.Collection<Meter> getMeters()
getMeters in interface MeterRegistrypublic Meter.Id createId(java.lang.String name, java.lang.Iterable<Tag> tag, java.lang.String description, java.lang.String baseUnit)
createId in interface MeterRegistry