RedisInstrumentation
class RedisInstrumentation extends AbstractInstrumentation
Traits
Constants
| protected CONNECTION_ATTRIBUTE |
|
| protected DURATION_BOUNDARIES |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation | |
| protected TracerInterface|null | $tracer | ||
| protected HistogramInterface|null | $duration | ||
| protected bool | $queryText | ||
| protected int|null | $queryTextMaxLength |
Methods
Register the instrumentation with normalized options.
Register Redis listeners and instruments.
Determine whether a metric is enabled.
Index callback observers by their matching instrument name.
Create Redis instrumentation.
Record one completed Redis operation.
Return low-cardinality attributes shared by spans and metrics.
Resolve the bounded Redis query text.
Details
in
AbstractInstrumentation at line 18
final void
register(array $options)
Register the instrumentation with normalized options.
at line 79
protected void
registerInstrumentation()
Register Redis listeners and instruments.
in
AbstractInstrumentation at line 32
protected bool
tracesEnabled()
Determine whether trace output is enabled.
in
AbstractInstrumentation at line 40
protected bool
metricEnabled(string $name)
Determine whether a metric is enabled.
in
AbstractInstrumentation at line 55
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 62
__construct(Dispatcher $events, TracerProviderInterface $tracerProvider, MeterProviderInterface $meterProvider, ClockInterface $clock, OpenTelemetryManager $openTelemetry, RedisManager $redis, RedisQueryTextFormatter $queryTextFormatter, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, ProcessIdentity $identity)
Create Redis instrumentation.
at line 117
protected void
commandExecuted(CommandExecuted $event)
Record a completed Redis command.
at line 130
protected void
commandFailed(CommandFailed $event)
Record a failed Redis command.
at line 149
protected void
recordCommand(string $command, array $parameters, float $elapsedMilliseconds, string $connection, Throwable|null $exception = null)
Record one completed Redis operation.
at line 226
protected array
attributes(string $operation, string $connection, string|null $errorType)
Return low-cardinality attributes shared by spans and metrics.
at line 241
protected string|null
queryText(string $command, string $operation, array $parameters, string $connection)
Resolve the bounded Redis query text.