public static interface LongObserver.Builder extends Observer.Builder
LongObserver.| Modifier and Type | Method and Description |
|---|---|
LongObserver |
build()
Builds and returns a
Instrument with the desired options. |
LongObserver.Builder |
setConstantLabels(Map<String,String> constantLabels)
Sets the map of constant labels (they will be added to all the Bound Instruments) for the
Instrument.
|
LongObserver.Builder |
setDescription(String description)
Sets the description of the
Instrument. |
LongObserver.Builder |
setLabelKeys(List<String> labelKeys)
Sets the list of label keys for the Instrument.
|
LongObserver.Builder |
setMonotonic(boolean monotonic)
Sets the monotonicity property for this
Instrument. |
LongObserver.Builder |
setUnit(String unit)
Sets the unit of the
Instrument. |
LongObserver.Builder setDescription(String description)
Instrument.BuilderInstrument.
Default value is "".
setDescription in interface Instrument.BuildersetDescription in interface Observer.Builderdescription - the description of the Instrument.LongObserver.Builder setUnit(String unit)
Instrument.BuilderInstrument.
Default value is "1".
setUnit in interface Instrument.BuildersetUnit in interface Observer.Builderunit - the unit of the Instrument.LongObserver.Builder setLabelKeys(List<String> labelKeys)
Instrument.BuilderDefault value is Collections.emptyList()
setLabelKeys in interface Instrument.BuildersetLabelKeys in interface Observer.BuilderlabelKeys - the list of label keys for the Instrument.LongObserver.Builder setConstantLabels(Map<String,String> constantLabels)
Instrument.BuilderDefault value is Collections.emptyMap().
setConstantLabels in interface Instrument.BuildersetConstantLabels in interface Observer.BuilderconstantLabels - the map of constant labels for the Instrument.LongObserver.Builder setMonotonic(boolean monotonic)
Observer.BuilderInstrument. If true successive values
are expected to rise monotonically.
Default value is false
setMonotonic in interface Observer.Buildermonotonic - true successive values are expected to rise monotonically.LongObserver build()
Instrument.BuilderInstrument with the desired options.build in interface Instrument.Builderbuild in interface Observer.BuilderInstrument with the desired options.