Class ExtendedDefaultMeter.NoopLongUpDownCounterBuilder
java.lang.Object
io.opentelemetry.api.incubator.metrics.ExtendedDefaultMeter.NoopLongUpDownCounterBuilder
- All Implemented Interfaces:
ExtendedLongUpDownCounterBuilder
,LongUpDownCounterBuilder
- Enclosing class:
ExtendedDefaultMeter
private static class ExtendedDefaultMeter.NoopLongUpDownCounterBuilder
extends Object
implements ExtendedLongUpDownCounterBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DoubleUpDownCounterBuilder
private static final ObservableLongUpDownCounter
private static final LongUpDownCounter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds and returns an UpDownCounter instrument with the configuration.Build an observer for this instrument to observe values from aBatchCallback
.buildWithCallback
(Consumer<ObservableLongMeasurement> callback) Builds an Asynchronous UpDownCounter instrument with the given callback.Sets the Counter for recordingdouble
values.setDescription
(String description) Sets the description for this instrument.Sets the unit of measure for this instrument.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.opentelemetry.api.incubator.metrics.ExtendedLongUpDownCounterBuilder
setAttributesAdvice
-
Field Details
-
NOOP_UP_DOWN_COUNTER
-
NOOP_OBSERVABLE_UP_DOWN_COUNTER
-
NOOP_DOUBLE_UP_DOWN_COUNTER_BUILDER
-
-
Constructor Details
-
NoopLongUpDownCounterBuilder
private NoopLongUpDownCounterBuilder()
-
-
Method Details
-
setDescription
Description copied from interface:LongUpDownCounterBuilder
Sets the description for this instrument.- Specified by:
setDescription
in interfaceLongUpDownCounterBuilder
- Parameters:
description
- The description.- See Also:
-
setUnit
Description copied from interface:LongUpDownCounterBuilder
Sets the unit of measure for this instrument.- Specified by:
setUnit
in interfaceLongUpDownCounterBuilder
- Parameters:
unit
- The unit. Instrument units must be 63 or fewer ASCII characters.- See Also:
-
ofDoubles
Description copied from interface:LongUpDownCounterBuilder
Sets the Counter for recordingdouble
values.- Specified by:
ofDoubles
in interfaceLongUpDownCounterBuilder
-
build
Description copied from interface:LongUpDownCounterBuilder
Builds and returns an UpDownCounter instrument with the configuration.- Specified by:
build
in interfaceLongUpDownCounterBuilder
- Returns:
- The UpDownCounter instrument.
-
buildWithCallback
Description copied from interface:LongUpDownCounterBuilder
Builds an Asynchronous UpDownCounter instrument with the given callback.The callback will be called when the instrument is being observed.
Callbacks are expected to abide by the following restrictions:
- Run in a finite amount of time.
- Safe to call repeatedly, across multiple threads.
- Specified by:
buildWithCallback
in interfaceLongUpDownCounterBuilder
- Parameters:
callback
- A callback which observes measurements when invoked.
-
buildObserver
Description copied from interface:LongUpDownCounterBuilder
Build an observer for this instrument to observe values from aBatchCallback
.This observer MUST be registered when creating a
batchCallback
, which records to it. Values observed outside registered callbacks are ignored.- Specified by:
buildObserver
in interfaceLongUpDownCounterBuilder
- Returns:
- an observable measurement that batch callbacks use to observe values.
-