@ThreadSafe public final class DefaultMeter extends Object implements Meter
Meter.| Modifier and Type | Method and Description |
|---|---|
LabelSet |
createLabelSet(Map<String,String> labels)
Returns a new
LabelSet with labels built from the keys and values in the provided Map. |
LabelSet |
createLabelSet(String... keyValuePairs)
Returns a new
LabelSet with the given labels. |
DoubleCounter.Builder |
doubleCounterBuilder(String name)
Returns a builder for a
DoubleCounter. |
DoubleMeasure.Builder |
doubleMeasureBuilder(String name)
Returns a new builder for a
DoubleMeasure. |
DoubleObserver.Builder |
doubleObserverBuilder(String name)
Returns a new builder for a
DoubleObserver. |
static Meter |
getInstance()
Returns a
Meter singleton that is the default implementations for Meter. |
LongCounter.Builder |
longCounterBuilder(String name)
Returns a builder for a
LongCounter. |
LongMeasure.Builder |
longMeasureBuilder(String name)
Returns a new builder for a
LongMeasure. |
LongObserver.Builder |
longObserverBuilder(String name)
Returns a new builder for a
LongObserver. |
BatchRecorder |
newBatchRecorder(String... keyValuePairs)
Utility method that allows users to atomically record measurements to a set of Measures with a
common set of labels.
|
public static Meter getInstance()
Meter singleton that is the default implementations for Meter.Meter singleton that is the default implementations for Meter.public DoubleCounter.Builder doubleCounterBuilder(String name)
MeterDoubleCounter.doubleCounterBuilder in interface Metername - the name of the metric. Should be a ASCII string with a length no greater than 255
characters.DoubleCounter.Builder.public LongCounter.Builder longCounterBuilder(String name)
MeterLongCounter.longCounterBuilder in interface Metername - the name of the metric. Should be a ASCII string with a length no greater than 255
characters.LongCounter.Builder.public DoubleMeasure.Builder doubleMeasureBuilder(String name)
MeterDoubleMeasure.doubleMeasureBuilder in interface Metername - Name of measure, as a String. Should be a ASCII string with a length no
greater than 255 characters.DoubleMeasure.public LongMeasure.Builder longMeasureBuilder(String name)
MeterLongMeasure.longMeasureBuilder in interface Metername - Name of measure, as a String. Should be a ASCII string with a length no
greater than 255 characters.LongMeasure.public DoubleObserver.Builder doubleObserverBuilder(String name)
MeterDoubleObserver.doubleObserverBuilder in interface Metername - Name of observer, as a String. Should be a ASCII string with a length no
greater than 255 characters.DoubleObserver.public LongObserver.Builder longObserverBuilder(String name)
MeterLongObserver.longObserverBuilder in interface Metername - Name of observer, as a String. Should be a ASCII string with a length no
greater than 255 characters.LongObserver.public BatchRecorder newBatchRecorder(String... keyValuePairs)
MeternewBatchRecorder in interface MeterkeyValuePairs - The set of labels to associate with this recorder and all it's recordings.MeasureBatchRecorder that can be use to atomically record a set of
measurements associated with different Measures.public LabelSet createLabelSet(String... keyValuePairs)
MeterLabelSet with the given labels.
The arguments must are in key, value pairs, so an even number of arguments are required.
If no arguments are provided, the resulting LabelSet will be the empty one.
createLabelSet in interface MeterkeyValuePairs - pairs of keys and values for the labels.LabelSet with the given labels.public LabelSet createLabelSet(Map<String,String> labels)
MeterLabelSet with labels built from the keys and values in the provided Map.createLabelSet in interface Meterlabels - The key-value pairs to turn into labels.LabelSet with the given labels.