@ThreadSafe public interface Meter
There are two ways to record measurements:
TODO: Update comment.
| Modifier and Type | Method and Description |
|---|---|
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. |
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.
|
DoubleCounter.Builder doubleCounterBuilder(String name)
DoubleCounter.name - the name of the metric. Should be a ASCII string with a length no greater than 255
characters.DoubleCounter.Builder.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.LongCounter.Builder longCounterBuilder(String name)
LongCounter.name - the name of the metric. Should be a ASCII string with a length no greater than 255
characters.LongCounter.Builder.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.DoubleMeasure.Builder doubleMeasureBuilder(String name)
DoubleMeasure.name - Name of measure, as a String. Should be a ASCII string with a length no
greater than 255 characters.DoubleMeasure.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.LongMeasure.Builder longMeasureBuilder(String name)
LongMeasure.name - Name of measure, as a String. Should be a ASCII string with a length no
greater than 255 characters.LongMeasure.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.DoubleObserver.Builder doubleObserverBuilder(String name)
DoubleObserver.name - Name of observer, as a String. Should be a ASCII string with a length no
greater than 255 characters.DoubleObserver.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.LongObserver.Builder longObserverBuilder(String name)
LongObserver.name - Name of observer, as a String. Should be a ASCII string with a length no
greater than 255 characters.LongObserver.NullPointerException - if name is null.IllegalArgumentException - if different metric with the same name already registered.IllegalArgumentException - if the name does not match the requirements.BatchRecorder newBatchRecorder(String... keyValuePairs)
keyValuePairs - 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.