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.

Parameters

string $name
string|null $unit
string|null $description
array $advisory

at line 35
void bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

Parameters

MeterInterface $meter

Return Value

void

at line 48
void unbind()

Unbind this handle from its worker instrument.

Return Value

void

at line 56
void record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null)

Record a value in the current histogram.

Parameters

float|int $amount
iterable $attributes
ContextInterface|false|null $context

Return Value

void

at line 68
bool isEnabled()

Determine whether the current histogram is enabled.

Return Value

bool