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 CallbackRegistrationprivate static final Loggerprivate final AtomicBooleanprivate final SdkMeterprivate final ThrottlingLogger -
Constructor Summary
ConstructorsConstructorDescriptionSdkObservableInstrument(SdkMeter sdkMeter, CallbackRegistration callbackRegistration) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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:ObservableDoubleCounterRemove 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceBatchCallback- Specified by:
closein interfaceObservableDoubleCounter- Specified by:
closein interfaceObservableDoubleGauge- Specified by:
closein interfaceObservableDoubleUpDownCounter- Specified by:
closein interfaceObservableLongCounter- Specified by:
closein interfaceObservableLongGauge- Specified by:
closein interfaceObservableLongUpDownCounter
-
toString
-