class DeferredObservableGauge implements ObservableGaugeInterface

internal  
 

Keep a pre-fork observable gauge and its creation callbacks replayable.

Properties

protected ObservableGaugeInterface|null $delegate

Methods

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

Create a deferred observable gauge.

void
bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

void
unbind()

Unbind this handle from its worker instrument.

ObservableCallbackInterface
observe(callable $callback)

Register an observation callback that follows worker rebinding.

bool
belongsTo(DeferredMeter $meter)

Determine whether this instrument belongs to the given deferred meter.

ObservableGaugeInterface|null
delegate()

Return the current worker instrument.

bool
isEnabled()

Determine whether the current observable gauge is enabled.

Details

at line 26
__construct(DeferredMeter $meter, string $name, string|null $unit, string|null $description, array $advisory, array $callbacks)

Create a deferred observable gauge.

Parameters

DeferredMeter $meter
string $name
string|null $unit
string|null $description
array $advisory
array $callbacks

at line 39
void bind(MeterInterface $meter)

Bind this handle to an instrument from the given meter.

Parameters

MeterInterface $meter

Return Value

void

at line 53
void unbind()

Unbind this handle from its worker instrument.

Return Value

void

at line 61
ObservableCallbackInterface observe(callable $callback)

Register an observation callback that follows worker rebinding.

Parameters

callable $callback

Return Value

ObservableCallbackInterface

at line 70
bool belongsTo(DeferredMeter $meter)

Determine whether this instrument belongs to the given deferred meter.

Parameters

DeferredMeter $meter

Return Value

bool

at line 78
ObservableGaugeInterface|null delegate()

Return the current worker instrument.

Return Value

ObservableGaugeInterface|null

at line 86
bool isEnabled()

Determine whether the current observable gauge is enabled.

Return Value

bool