Public documentation
Documentation indexRead as MarkdownRedis
Instrument Redis calls in your application to see request latency and errors.
Add the Collector redis receiver for node statistics. In Contrib 0.160.0 this
receiver's metrics signal is beta; it polls Redis INFO and does not create
per-command spans or read application values into traces.
Application calls
For a JVM application using supported Jedis or Lettuce versions, follow the Java agent guide and restart the calling application with the agent attached before creating its clients:
java -javaagent:/opt/otel/opentelemetry-javaagent.jar -jar application.jar
Retain your application's configured service name and OTLP export settings. Exercise an existing application operation that performs a Redis GET or SET. Other runtimes should follow their language setup and enable instrumentation for the exact Redis client they use. Do not enable raw command/argument capture just to prove connectivity.
Prepare the monitoring connection
Create a dedicated Redis ACL user for monitoring. Permit INFO and any client
handshake commands required by the receiver's Redis client; do not give the
monitor application key read/write access or +@all. Test the configured user
and inspect Redis ACL failures to identify a genuinely required command.
Redis before version 6 uses password authentication rather than named ACL users.
This example assumes a TLS-enabled node at redis.internal:6379, an account
named otel_monitor, and a mounted CA. A Redis cluster requires an intentional
node inventory; one endpoint is not a guarantee of whole-cluster coverage.
Add the metrics receiver
Merge this partial fragment into common setup. Keep all
existing pipelines. Requires Contrib's redis receiver and resource processor.
receivers:
redis/cache:
endpoint: redis.internal:6379
username: otel_monitor
password: ${env:REDIS_MONITOR_PASSWORD}
collection_interval: 30s
tls:
insecure: false
ca_file: /etc/otel/certs/redis-ca.pem
processors:
resource/redis:
attributes:
- key: service.name
value: redis-cache
action: upsert
- key: deployment.environment.name
value: production
action: upsert
service:
pipelines:
metrics/redis:
receivers: [redis/cache]
processors: [memory_limiter, resource/redis, batch]
exporters: [otlp_http/corridora]
Inject REDIS_MONITOR_PASSWORD into the Collector environment. Do not disable
certificate validation to compensate for a certificate with the wrong host name.
Server logs require a separate log collection path; this metrics pipeline does
not collect the Redis log file.
Verify
From the Collector network, run the following using the monitoring password
through REDISCLI_AUTH, supplied securely to the process:
redis-cli --tls --cacert /etc/otel/certs/redis-ca.pem \
-h redis.internal -p 6379 --user otel_monitor INFO clients
Expect connected_clients in the response. Validate the merged Collector
configuration, then wait at least two 30-second intervals. In Corridora, select
service redis-cache and search Metrics for redis.clients.connected and
redis.memory.used. Generate a normal application cache request and separately
verify a client span under the application's service.
If metrics fail, check ACL errors, the TLS listener, CA mount, and target address. If metrics exist but spans do not, inspect application instrumentation and sampling; the scraper cannot supply those spans. Complete verification.
Source basis: Redis receiver README and generated metrics documentation, Collector Contrib 0.160.0; Redis ACL documentation; OpenTelemetry Java supported libraries. Reviewed 2026-09-28.