public interface MetricProvider
MetricRegistry
.Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns a unique name of the Metric Provider.
|
void |
init()
This will be called when initializing the default
MetricRegistry . |
Counter |
newCounter(MetricId metricId)
This returns the new instance of the Counter metric.
|
Gauge |
newGauge(MetricId metricId,
StatisticConfig... statisticConfigs)
This returns the new instance of the Gauge metric.
|
<T> PolledGauge |
newPolledGauge(MetricId metricId,
T obj,
ToDoubleFunction<T> toDoubleFunction)
This returns the new instance of the Polled Gauge metric.
|
String getName()
MetricRegistry
void init()
MetricRegistry
.Counter newCounter(MetricId metricId)
metricId
- ID of the metric that needs to be returned.Gauge newGauge(MetricId metricId, StatisticConfig... statisticConfigs)
metricId
- ID of the metric that needs to be returned.statisticConfigs
- array of StatisticConfig
s which configures the distribution statistics.<T> PolledGauge newPolledGauge(MetricId metricId, T obj, ToDoubleFunction<T> toDoubleFunction)
T
- The type of the state object from which the gauge value is extracted.metricId
- ID of the metric that needs to be returned.obj
- State object used to compute a value.toDoubleFunction
- Function that produces an instantaneous gauge value from the state object.Copyright © 2018 WSO2. All rights reserved.