DeferredCounter
class DeferredCounter implements CounterInterface
| internal |
Keep a pre-fork counter usable after a worker meter is bound.
Properties
| protected CounterInterface|null | $delegate |
Methods
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred counter.
void
bind(MeterInterface $meter)
Bind this handle to an instrument from the given meter.
void
unbind()
Unbind this handle from its worker instrument.
void
add(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null)
Add a value to the current counter.
bool
isEnabled()
Determine whether the current counter is enabled.
Details
at line 24
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred counter.
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
add(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null)
Add a value to the current counter.
at line 68
bool
isEnabled()
Determine whether the current counter is enabled.