Package io.opentelemetry.api.metrics
Interface LongUpDownSumObserverBuilder
-
- All Superinterfaces:
AsynchronousInstrumentBuilder<AsynchronousInstrument.LongResult>
,InstrumentBuilder
public interface LongUpDownSumObserverBuilder extends AsynchronousInstrumentBuilder<AsynchronousInstrument.LongResult>
Builder class forLongUpDownSumObserver
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LongUpDownSumObserver
build()
Builds and returns aInstrument
with the desired options.LongUpDownSumObserverBuilder
setDescription(String description)
Sets the description of theInstrument
.LongUpDownSumObserverBuilder
setUnit(String unit)
Sets the unit of theInstrument
.LongUpDownSumObserverBuilder
setUpdater(Consumer<AsynchronousInstrument.LongResult> updater)
Sets a consumer that gets executed every collection interval.
-
-
-
Method Detail
-
setDescription
LongUpDownSumObserverBuilder setDescription(String description)
Description copied from interface:InstrumentBuilder
Sets the description of theInstrument
.Default value is
""
.- Specified by:
setDescription
in interfaceInstrumentBuilder
- Parameters:
description
- the description of the Instrument.- Returns:
- this.
-
setUnit
LongUpDownSumObserverBuilder setUnit(String unit)
Description copied from interface:InstrumentBuilder
Sets the unit of theInstrument
.Default value is
"1"
.- Specified by:
setUnit
in interfaceInstrumentBuilder
- Parameters:
unit
- the unit of the Instrument.- Returns:
- this.
-
setUpdater
LongUpDownSumObserverBuilder setUpdater(Consumer<AsynchronousInstrument.LongResult> updater)
Description copied from interface:AsynchronousInstrumentBuilder
Sets a consumer that gets executed every collection interval.Evaluation is deferred until needed, if this
AsynchronousInstrument
metric is not exported then it will never be called.- Specified by:
setUpdater
in interfaceAsynchronousInstrumentBuilder<AsynchronousInstrument.LongResult>
- Parameters:
updater
- the consumer to be executed before export.
-
build
LongUpDownSumObserver build()
Description copied from interface:InstrumentBuilder
Builds and returns aInstrument
with the desired options.- Specified by:
build
in interfaceAsynchronousInstrumentBuilder<AsynchronousInstrument.LongResult>
- Specified by:
build
in interfaceInstrumentBuilder
- Returns:
- a
Instrument
with the desired options.
-
-