DeferredGauge
class DeferredGauge implements GaugeInterface
| internal |
Keep a pre-fork gauge usable after a worker meter is bound.
Properties
| protected GaugeInterface|null | $delegate |
Methods
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred gauge.
void
bind(MeterInterface $meter)
Bind this handle to an instrument from the given meter.
void
unbind()
Unbind this handle from its worker instrument.
void
record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null)
Record a value in the current gauge.
bool
isEnabled()
Determine whether the current gauge is enabled.
Details
at line 24
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred gauge.
at line 35
void
bind(MeterInterface $meter)
Bind this handle to an instrument from the given meter.
at line 48
void
unbind()
Unbind this handle from its worker instrument.
at line 56
void
record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null)
Record a value in the current gauge.
at line 68
bool
isEnabled()
Determine whether the current gauge is enabled.