DeferredHistogram
class DeferredHistogram implements HistogramInterface
| internal |
Keep a pre-fork histogram usable after a worker meter is bound.
Properties
| protected HistogramInterface|null | $delegate |
Methods
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred histogram.
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 histogram.
bool
isEnabled()
Determine whether the current histogram is enabled.
Details
at line 24
__construct(string $name, string|null $unit, string|null $description, array $advisory)
Create a deferred histogram.
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 histogram.
at line 68
bool
isEnabled()
Determine whether the current histogram is enabled.