class PoolInstrumentation extends AbstractInstrumentation

Constants

protected OBJECTS_METRIC

protected OBJECTS_MAX_METRIC

protected OBJECTS_PENDING_REQUESTS_METRIC

protected OBJECT_POOL_NAME_ATTRIBUTE

protected OBJECT_POOL_STATE_ATTRIBUTE

Properties

protected InstrumentationOptions $options from  AbstractInstrumentation

Methods

void
register(array $options)

Register the instrumentation with normalized options.

void
registerInstrumentation()

Register pool instruments and collection callbacks.

bool
tracesEnabled()

Determine whether trace output is enabled.

bool
metricEnabled(string $name)

Determine whether a metric is enabled.

array
indexObservers(array $names, array $observers)

Index callback observers by their matching instrument name.

__construct(PoolManager $databasePools, PoolManager $redisPools, PoolManager $objectPools, MeterProviderInterface $meterProvider)

Create pool instrumentation.

ObservableUpDownCounterInterface
createInstrument(MeterInterface $meter, string $name)

Create one observable pool instrument.

void
observeConnectionPools(array $observers)

Record snapshots from every existing database and Redis connection pool.

void
observeConnectionPool(array $observers, ConnectionPool $pool, string $name)

Record one existing connection-pool snapshot.

void
observeObjectPools(array $observers)

Record snapshots from every existing object pool.

Details

final void register(array $options)

Register the instrumentation with normalized options.

Parameters

array $options

Return Value

void

at line 44
protected void registerInstrumentation()

Register pool instruments and collection callbacks.

Return Value

void

protected bool tracesEnabled()

Determine whether trace output is enabled.

Return Value

bool

protected bool metricEnabled(string $name)

Determine whether a metric is enabled.

Parameters

string $name

Return Value

bool

protected array indexObservers(array $names, array $observers)

Index callback observers by their matching instrument name.

The SDK supplies observers in the same order as the instruments passed to batchObserve(), so the unchanged name order is the mapping contract.

Parameters

array $names
array $observers

Return Value

array

at line 33
__construct(PoolManager $databasePools, PoolManager $redisPools, PoolManager $objectPools, MeterProviderInterface $meterProvider)

Create pool instrumentation.

Parameters

PoolManager $databasePools
PoolManager $redisPools
PoolManager $objectPools
MeterProviderInterface $meterProvider

at line 99
protected ObservableUpDownCounterInterface createInstrument(MeterInterface $meter, string $name)

Create one observable pool instrument.

Parameters

MeterInterface $meter
string $name

Return Value

ObservableUpDownCounterInterface

at line 136
protected void observeConnectionPools(array $observers)

Record snapshots from every existing database and Redis connection pool.

Parameters

array $observers

Return Value

void

at line 152
protected void observeConnectionPool(array $observers, ConnectionPool $pool, string $name)

Record one existing connection-pool snapshot.

Parameters

array $observers
ConnectionPool $pool
string $name

Return Value

void

at line 188
protected void observeObjectPools(array $observers)

Record snapshots from every existing object pool.

Parameters

array $observers

Return Value

void