Optional OpenTelemetry integration for Redis.
Creates OTel spans for Redis commands by attaching to the existing
:telemetry events emitted by Redis.Telemetry. Requires the
:opentelemetry_api dependency.
Setup
# In your application startup:
Redis.OpenTelemetry.attach()Span Attributes
Follows the OpenTelemetry semantic conventions for databases:
db.system- always"redis"db.operation.name- the Redis command name (e.g."GET","SET")db.statement- the full command with arguments sanitizeddb.redis.database_index- database index if present in metadataserver.address- Redis server host if presentserver.port- Redis server port if present
Teardown
Redis.OpenTelemetry.detach()