public abstract class AbstractStepRegistry
extends com.netflix.spectator.api.AbstractRegistry
Registry
implementation that is suitable for
any monitoring system that expects metrics on an interval with step-aggregated values.
Where applicable, the Meter
implementations created
by this registry will maintain two values where one is the current value being updated
and the other is the value from the previous interval and is only available for polling.Modifier and Type | Field and Description |
---|---|
protected int |
connectTimeout |
protected int |
readTimeout |
Constructor and Description |
---|
AbstractStepRegistry(com.netflix.spectator.api.Clock clock,
StepRegistryConfig config) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.util.List<com.netflix.spectator.api.Measurement>> |
getBatches()
Get a list of all measurements and break them into batches.
|
protected com.netflix.spectator.api.Counter |
newCounter(com.netflix.spectator.api.Id id) |
protected com.netflix.spectator.api.DistributionSummary |
newDistributionSummary(com.netflix.spectator.api.Id id) |
protected com.netflix.spectator.api.Gauge |
newGauge(com.netflix.spectator.api.Id id) |
protected com.netflix.spectator.api.Timer |
newTimer(com.netflix.spectator.api.Id id) |
protected abstract void |
pushMetrics() |
void |
start()
Start the scheduler to collect metrics data.
|
void |
stop()
Stop the scheduler reporting Datadog metrics.
|
clock, config, counter, createId, createId, distributionSummary, gauge, get, iterator, register, state, timer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collectionSize, collectionSize, counter, counter, counter, counters, createId, createId, distributionSummaries, distributionSummary, distributionSummary, distributionSummary, gauge, gauge, gauge, gauge, gauge, gauges, longTaskTimer, longTaskTimer, longTaskTimer, longTaskTimer, mapSize, mapSize, methodValue, methodValue, propagate, propagate, stream, timer, timer, timer, timers, underlying
protected final int connectTimeout
protected final int readTimeout
public AbstractStepRegistry(com.netflix.spectator.api.Clock clock, StepRegistryConfig config)
public void start()
public void stop()
protected abstract void pushMetrics()
protected java.util.List<java.util.List<com.netflix.spectator.api.Measurement>> getBatches()
protected com.netflix.spectator.api.Counter newCounter(com.netflix.spectator.api.Id id)
newCounter
in class com.netflix.spectator.api.AbstractRegistry
protected com.netflix.spectator.api.DistributionSummary newDistributionSummary(com.netflix.spectator.api.Id id)
newDistributionSummary
in class com.netflix.spectator.api.AbstractRegistry
protected com.netflix.spectator.api.Timer newTimer(com.netflix.spectator.api.Id id)
newTimer
in class com.netflix.spectator.api.AbstractRegistry
protected com.netflix.spectator.api.Gauge newGauge(com.netflix.spectator.api.Id id)
newGauge
in class com.netflix.spectator.api.AbstractRegistry