Package com.lightbend.cinnamon.metric
Interface MetricFactory
-
public interface MetricFactory
MetricFactory
interface to create metrics for an instrumented entity.
-
-
Field Summary
Fields Modifier and Type Field Description static MetricFactory
NONE
Empty no-opMetricFactory
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Counter
createCounter(Descriptor descriptor)
Create aCounter
metric.GaugeDouble
createGaugeDouble(Descriptor descriptor)
Create aGaugeDouble
metric.GaugeLong
createGaugeLong(Descriptor descriptor)
Create aGaugeLong
metric.ProvidingGaugeDouble
createProvidingGaugeDouble(Descriptor descriptor, DoubleValueProvider doubleValueProvider)
Create aProvidingGaugeDouble
metric.ProvidingGaugeLong
createProvidingGaugeLong(Descriptor descriptor, LongValueProvider longValueProvider)
Create aProvidingGaugeLong
metric.Rate
createRate(Descriptor descriptor)
Create aRate
metric.Recorder
createRecorder(Descriptor descriptor)
Create aRecorder
metric.
-
-
-
Field Detail
-
NONE
static final MetricFactory NONE
Empty no-opMetricFactory
.
-
-
Method Detail
-
createCounter
Counter createCounter(Descriptor descriptor)
Create aCounter
metric.- Parameters:
descriptor
- metric descriptor for this Counter- Returns:
- new Counter for instrumented entity and given descriptor
-
createGaugeLong
GaugeLong createGaugeLong(Descriptor descriptor)
Create aGaugeLong
metric.- Parameters:
descriptor
- metric descriptor for this GaugeLong- Returns:
- new GaugeLong for instrumented entity and given descriptor
-
createGaugeDouble
GaugeDouble createGaugeDouble(Descriptor descriptor)
Create aGaugeDouble
metric.- Parameters:
descriptor
- metric descriptor for this GaugeDouble- Returns:
- new GaugeDouble for instrumented entity and given descriptor
-
createProvidingGaugeLong
ProvidingGaugeLong createProvidingGaugeLong(Descriptor descriptor, LongValueProvider longValueProvider)
Create aProvidingGaugeLong
metric.- Parameters:
descriptor
- metric descriptor for this ProvidingGaugeLonglongValueProvider
- LongValueProvider that will be called to get the current value- Returns:
- new ProvidingGaugeLong for instrumented entity and given descriptor and value provider
-
createProvidingGaugeDouble
ProvidingGaugeDouble createProvidingGaugeDouble(Descriptor descriptor, DoubleValueProvider doubleValueProvider)
Create aProvidingGaugeDouble
metric.- Parameters:
descriptor
- metric descriptor for this ProvidingGaugeDoubledoubleValueProvider
- DoubleValueProvider that will be called to get the current value- Returns:
- new ProvidingGaugeDouble for instrumented entity and given descriptor and value provider
-
createRate
Rate createRate(Descriptor descriptor)
Create aRate
metric.- Parameters:
descriptor
- metric descriptor for this Rate- Returns:
- new Rate for instrumented entity and given descriptor
-
createRecorder
Recorder createRecorder(Descriptor descriptor)
Create aRecorder
metric.- Parameters:
descriptor
- metric descriptor for this Recorder- Returns:
- new Recorder for instrumented entity and given descriptor
-
-