class ExceptionInstrumentation extends AbstractInstrumentation

Traits

LogsMessagesTrait

Constants

protected EXCEPTIONS_METRIC

Properties

protected InstrumentationOptions $options from  AbstractInstrumentation
protected bool $message
protected bool $stackTrace
protected bool $userContext
protected LoggerInterface|null $logger
protected CounterInterface|null $exceptions

Methods

void
register(array $options)

Register the instrumentation with normalized options.

void
registerInstrumentation()

Register direct exception recording.

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(Container $container, LoggerProviderInterface $loggerProvider, MeterProviderInterface $meterProvider, ClockInterface $clock, OpenTelemetryManager $openTelemetry, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, ProcessIdentity $identity, UserContextResolver $userContexts)

Create exception instrumentation.

void
record(Throwable $exception)

Record one reported exception.

Details

final void register(array $options)

Register the instrumentation with normalized options.

Parameters

array $options

Return Value

void

at line 65
protected void registerInstrumentation()

Register direct exception recording.

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 49
__construct(Container $container, LoggerProviderInterface $loggerProvider, MeterProviderInterface $meterProvider, ClockInterface $clock, OpenTelemetryManager $openTelemetry, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, ProcessIdentity $identity, UserContextResolver $userContexts)

Create exception instrumentation.

Parameters

Container $container
LoggerProviderInterface $loggerProvider
MeterProviderInterface $meterProvider
ClockInterface $clock
OpenTelemetryManager $openTelemetry
ExceptionContextRegistry $exceptionContexts
OperationOrigin $origins
ProcessIdentity $identity
UserContextResolver $userContexts

at line 113
protected void record(Throwable $exception)

Record one reported exception.

Parameters

Throwable $exception

Return Value

void