Package io.opentelemetry.api.metrics
Interface DoubleUpDownSumObserverBuilder
-
- All Superinterfaces:
AsynchronousInstrumentBuilder<AsynchronousInstrument.DoubleResult>,InstrumentBuilder
public interface DoubleUpDownSumObserverBuilder extends AsynchronousInstrumentBuilder<AsynchronousInstrument.DoubleResult>
Builder class forDoubleUpDownSumObserver.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DoubleUpDownSumObserverbuild()Builds and returns aInstrumentwith the desired options.DoubleUpDownSumObserverBuildersetDescription(String description)Sets the description of theInstrument.DoubleUpDownSumObserverBuildersetUnit(String unit)Sets the unit of theInstrument.DoubleUpDownSumObserverBuildersetUpdater(Consumer<AsynchronousInstrument.DoubleResult> updater)Sets a consumer that gets executed every collection interval.
-
-
-
Method Detail
-
setDescription
DoubleUpDownSumObserverBuilder setDescription(String description)
Description copied from interface:InstrumentBuilderSets the description of theInstrument.Default value is
"".- Specified by:
setDescriptionin interfaceInstrumentBuilder- Parameters:
description- the description of the Instrument.- Returns:
- this.
-
setUnit
DoubleUpDownSumObserverBuilder setUnit(String unit)
Description copied from interface:InstrumentBuilderSets the unit of theInstrument.Default value is
"1".- Specified by:
setUnitin interfaceInstrumentBuilder- Parameters:
unit- the unit of the Instrument.- Returns:
- this.
-
setUpdater
DoubleUpDownSumObserverBuilder setUpdater(Consumer<AsynchronousInstrument.DoubleResult> updater)
Description copied from interface:AsynchronousInstrumentBuilderSets a consumer that gets executed every collection interval.Evaluation is deferred until needed, if this
AsynchronousInstrumentmetric is not exported then it will never be called.- Specified by:
setUpdaterin interfaceAsynchronousInstrumentBuilder<AsynchronousInstrument.DoubleResult>- Parameters:
updater- the consumer to be executed before export.
-
build
DoubleUpDownSumObserver build()
Description copied from interface:InstrumentBuilderBuilds and returns aInstrumentwith the desired options.- Specified by:
buildin interfaceAsynchronousInstrumentBuilder<AsynchronousInstrument.DoubleResult>- Specified by:
buildin interfaceInstrumentBuilder- Returns:
- a
Instrumentwith the desired options.
-
-