CacheInstrumentation
class CacheInstrumentation extends AbstractInstrumentation
Traits
Constants
| protected OPERATIONS_METRIC |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation | |
| protected bool | $traceEvents | ||
| protected bool | $captureKey | ||
| protected int|null | $keyMaxLength | ||
| protected CounterInterface|null | $operations |
Methods
Register the instrumentation with normalized options.
Register cache listeners and instruments.
Determine whether a metric is enabled.
Determine whether the throwable is a direct coroutine cancellation.
Return the semantic conventions schema URL for Hypervel instrumentation scopes.
Index callback observers by their matching instrument name.
Create cache instrumentation.
Return the recording active span when trace events are enabled.
Resolve the bounded cache key.
Details
in
AbstractInstrumentation at line 21
final void
register(array $options)
Register the instrumentation with normalized options.
at line 59
protected void
registerInstrumentation()
Register cache listeners and instruments.
in
AbstractInstrumentation at line 35
protected bool
tracesEnabled()
Determine whether trace output is enabled.
in
AbstractInstrumentation at line 43
protected bool
metricEnabled(string $name)
Determine whether a metric is enabled.
in
AbstractInstrumentation 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.
in
AbstractInstrumentation 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.
in
AbstractInstrumentation 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.
at line 49
__construct(Dispatcher $events, MeterProviderInterface $meterProvider, OpenTelemetryManager $openTelemetry)
Create cache instrumentation.
at line 141
protected void
record(string $operation, string $result, string|null $store, int $count = 1, Throwable|null $exception = null, string|null $key = null, int|null $timeToLive = null, string|null $failedStore = null)
Record one completed cache operation.
at line 189
protected SpanInterface|null
recordingSpan()
Return the recording active span when trace events are enabled.
at line 203
protected string|null
key(string $key, string|null $store)
Resolve the bounded cache key.