ObservableCounterInterface
extends
AsynchronousInstrument
in
Marker interface for asynchronous instruments.
Table of Contents
Methods
- isEnabled() : bool
- Determine if the instrument is enabled. Instrumentation authors SHOULD call this API each time they record a measurement.
- observe() : ObservableCallbackInterface
Methods
isEnabled()
Determine if the instrument is enabled. Instrumentation authors SHOULD call this API each time they record a measurement.
public
isEnabled() : bool
MUST return false if:
- The MeterConfig of the Meter used to create the instrument has parameter disabled=true
- All resolved views for the instrument are configured with the Drop Aggregation
Tags
Return values
boolobserve()
public
observe(callable(ObserverInterface): void $callback) : ObservableCallbackInterface
Parameters
- $callback : callable(ObserverInterface): void
-
function responsible for reporting the measurements (as absolute values)
Return values
ObservableCallbackInterface —token to detach callback