Package io.opentelemetry.sdk.metrics
Class SdkObservableInstrument
java.lang.Object
io.opentelemetry.sdk.metrics.SdkObservableInstrument
- All Implemented Interfaces:
BatchCallback
,ObservableDoubleCounter
,ObservableDoubleGauge
,ObservableDoubleUpDownCounter
,ObservableLongCounter
,ObservableLongGauge
,ObservableLongUpDownCounter
,AutoCloseable
class SdkObservableInstrument
extends Object
implements ObservableDoubleCounter, ObservableLongCounter, ObservableDoubleGauge, ObservableLongGauge, ObservableDoubleUpDownCounter, ObservableLongUpDownCounter, BatchCallback
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CallbackRegistration
private static final Logger
private final AtomicBoolean
private final SdkMeter
private final ThrottlingLogger
-
Constructor Summary
ConstructorsConstructorDescriptionSdkObservableInstrument
(SdkMeter sdkMeter, CallbackRegistration callbackRegistration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Remove the callback registered viaDoubleCounterBuilder.buildWithCallback(Consumer)
.toString()
-
Field Details
-
logger
-
throttlingLogger
-
sdkMeter
-
callbackRegistration
-
removed
-
-
Constructor Details
-
SdkObservableInstrument
SdkObservableInstrument(SdkMeter sdkMeter, CallbackRegistration callbackRegistration)
-
-
Method Details
-
close
public void close()Description copied from interface:ObservableDoubleCounter
Remove the callback registered viaDoubleCounterBuilder.buildWithCallback(Consumer)
. After this is called, the callback won't be invoked on future collections. Subsequent calls toObservableDoubleCounter.close()
have no effect.Note: other callbacks registered to the instrument with the same identity are unaffected.
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBatchCallback
- Specified by:
close
in interfaceObservableDoubleCounter
- Specified by:
close
in interfaceObservableDoubleGauge
- Specified by:
close
in interfaceObservableDoubleUpDownCounter
- Specified by:
close
in interfaceObservableLongCounter
- Specified by:
close
in interfaceObservableLongGauge
- Specified by:
close
in interfaceObservableLongUpDownCounter
-
toString
-