public interface MetricHistoryManager
Modifier and Type | Field and Description |
---|---|
static int |
BASE_RETAIN_MINUTES |
static int |
BASE_UPDATE_MILLIS |
Modifier and Type | Method and Description |
---|---|
java.util.List<Datapoint> |
historyAll(java.lang.String metricName)
Returns all history for the metric.
|
java.util.List<Datapoint> |
historyInterpolated(java.lang.String metricName,
int density)
Returns all available history for the metric in a compressed form.
|
java.util.List<Datapoint> |
historyMostRecent(java.lang.String metricName,
int dataPoints)
Returns the most recent X datapoints for the metric.
|
void |
record(java.lang.String metricId,
com.codahale.metrics.Metric metric) |
void |
record(java.lang.String metricId,
com.codahale.metrics.Metric metric,
int pollRateMillis,
int retainMinutes) |
void |
registerCounter(com.codahale.metrics.Counter counter,
java.lang.String counterPath)
Registers the counter in both the GatewayContext metricRegistry and in this history manager..
|
void |
registerCounter(com.codahale.metrics.Counter counter,
java.lang.String counterPath,
int pollRateMillis,
int retainMinutes)
Registers the counter in this history manager at the specified poll
rate in milliseconds.
|
void |
registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge,
java.lang.String gaugePath)
Registers the gauge in this history manager.
|
void |
registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge,
java.lang.String gaugePath,
int pollRateMillis,
int retainMinutes)
Registers the gauge in this history manager at the specified poll rate in milliseconds.
|
void |
stopRecording(java.lang.String metricId) |
void |
unregisterMetric(java.lang.String metricPath)
Removes the metric this history manager.
|
static final int BASE_UPDATE_MILLIS
static final int BASE_RETAIN_MINUTES
void record(java.lang.String metricId, com.codahale.metrics.Metric metric)
void record(java.lang.String metricId, com.codahale.metrics.Metric metric, int pollRateMillis, int retainMinutes)
void stopRecording(java.lang.String metricId)
void registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge, java.lang.String gaugePath)
gauge
- gaugePath
- the gauge can be retrieved at any time using this pathvoid registerGauge(com.codahale.metrics.Gauge<java.lang.Double> gauge, java.lang.String gaugePath, int pollRateMillis, int retainMinutes)
gauge
- gaugePath
- the gauge can be retrieved at any time using this pathpollRateMillis
- retainMinutes
- void registerCounter(com.codahale.metrics.Counter counter, java.lang.String counterPath)
counter
- counterPath
- the counter can be retrieved at any time using this pathvoid registerCounter(com.codahale.metrics.Counter counter, java.lang.String counterPath, int pollRateMillis, int retainMinutes)
counter
- counterPath
- the counter can be retrieved at any time using this pathpollRateMillis
- retainMinutes
- void unregisterMetric(java.lang.String metricPath)
metricPath
- the path that was originally used to register the metric.java.util.List<Datapoint> historyAll(java.lang.String metricName) throws java.sql.SQLException
metricName
- java.sql.SQLException
java.util.List<Datapoint> historyMostRecent(java.lang.String metricName, int dataPoints) throws java.sql.SQLException
metricName
- dataPoints
- the most recent X datapoints to returnjava.sql.SQLException
java.util.List<Datapoint> historyInterpolated(java.lang.String metricName, int density) throws java.sql.SQLException
metricName
- density
- java.sql.SQLException