abstract class AbstractInstrumentation implements Instrumentation

Properties

protected InstrumentationOptions $options

Methods

void
register(array $options)

Register the instrumentation with normalized options.

void
registerInstrumentation()

Register listeners, observers, and instruments.

bool
tracesEnabled()

Determine whether trace output is enabled.

bool
metricEnabled(string $name)

Determine whether a metric is enabled.

bool
isDirectCancellation(Throwable|null $exception)

Determine whether the throwable is a direct coroutine cancellation.

string
schemaUrl()

Return the semantic conventions schema URL for Hypervel instrumentation scopes.

array
indexObservers(array $names, array $observers)

Index callback observers by their matching instrument name.

Details

at line 21
final void register(array $options)

Register the instrumentation with normalized options.

Parameters

array $options

Return Value

void

at line 30
abstract protected void registerInstrumentation()

Register listeners, observers, and instruments.

Return Value

void

at line 35
protected bool tracesEnabled()

Determine whether trace output is enabled.

Return Value

bool

at line 43
protected bool metricEnabled(string $name)

Determine whether a metric is enabled.

Parameters

string $name

Return Value

bool

at line 53
protected bool isDirectCancellation(Throwable|null $exception)

Determine whether the throwable is a direct coroutine cancellation.

Ending an operation by direct cancellation is control flow, not a failure.

Parameters

Throwable|null $exception

Return Value

bool

at line 64
protected string schemaUrl()

Return the semantic conventions schema URL for Hypervel instrumentation scopes.

Every tracer, meter and logger obtained for one scope must pass the same URL.

Return Value

string

at line 79
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