NAME
Async::Redis::Telemetry - Observability for Redis client
SYNOPSIS
use Async::Redis;
use OpenTelemetry;
my $redis = Async::Redis->new(
host => 'localhost',
# OpenTelemetry integration
otel_tracer => OpenTelemetry->tracer_provider->tracer('redis'),
otel_meter => OpenTelemetry->meter_provider->meter('redis'),
# Debug logging
debug => 1, # log to STDERR
debug => sub { # custom logger
my ($direction, $data) = @_;
$logger->debug("[$direction] $data");
},
);
DESCRIPTION
Provides OpenTelemetry tracing, metrics collection, and debug logging with automatic credential redaction.
Credential Redaction
Sensitive commands are automatically redacted in logs and traces:
AUTH password -> AUTH [REDACTED]
AUTH user pass -> AUTH user [REDACTED]
CONFIG SET requirepass x -> CONFIG SET requirepass [REDACTED]
MIGRATE ... AUTH pass -> MIGRATE ... AUTH [REDACTED]
Metrics
redis.commands.total - Counter by command name
redis.commands.duration - Histogram of latency
redis.connections.active - Gauge of current connections
redis.errors.total - Counter by error type
redis.reconnects.total - Counter of reconnect attempts
redis.pipeline.size - Histogram of pipeline batch sizes