class DeferredUpDownCounter implements UpDownCounterInterface

internal  
 

Keep a pre-fork up-down counter usable after a worker meter is bound.

Properties

protected UpDownCounterInterface|null $delegate

Methods

__construct(string $name, string|null $unit, string|null $description, array $advisory)

Create a deferred up-down 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(mixed $amount, iterable $attributes = [], mixed $context = null)

Add a value to the current up-down counter.

bool
isEnabled()

Determine whether the current up-down counter is enabled.

Details

at line 23
__construct(string $name, string|null $unit, string|null $description, array $advisory)

Create a deferred up-down counter.

Parameters

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

at line 34
void bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

Parameters

MeterInterface $meter

Return Value

void

at line 47
void unbind()

Unbind this handle from its worker instrument.

Return Value

void

at line 55
void add(mixed $amount, iterable $attributes = [], mixed $context = null)

Add a value to the current up-down counter.

Parameters

mixed $amount
iterable $attributes
mixed $context

Return Value

void

at line 64
bool isEnabled()

Determine whether the current up-down counter is enabled.

Return Value

bool