A helper repository for exploring Redis client observability with OpenTelemetry. This repo provides working examples in Go (go-redis) and Python (redis-py) along with a complete observability stack that you can spin up locally to easily try out Redis client metrics and tracing.
- Python Example (redis-py) - Complete working example in Go with OpenTelemetry instrumentation
- Go Example (go-redis) - Complete working example in Python with OpenTelemetry instrumentation
- One-Command Stack - Start the entire observability infrastructure with
make start - Pre-built Dashboards - Ready-to-use Grafana dashboards for Redis client metrics
- Docker and Docker Compose installed
- Make utility available
- Redis server running (or use:
docker run -d -p 6379:6379 redis:latest) - Python 3.8+ (for Python example) or Go 1.21+ (for Go example)
# Start all services
make start
# Check status
make statusThis starts:
- OpenTelemetry Collector on ports 4317 (gRPC) and 4318 (HTTP)
- Prometheus on port 9090
- Grafana on port 3000
- Username: admin
- Password: admin
Navigate to Dashboards → Redis folder to see the pre-built dashboard.
Python Example (redis-py):
cd examples/python
pip install -r requirements.txt
python main.pyGo Example (go-redis):
cd examples/go
go mod download
go run main.goBoth examples will:
- Connect to Redis on
localhost:6379 - Send metrics to the OTLP collector
- Execute various Redis operations
- Export metrics every 10 seconds
This observability stack works with Redis client libraries that have OpenTelemetry support:
More client libraries coming soon!
A Redis Client Observability Dashboard is included and automatically provisioned:
File: grafana/dashboards/redis-client-observability.json
Monitors Redis client library performance with SDK-level metrics:
- Operation Rate - Commands per second by operation type
- Operation Duration - Latency percentiles (p50, p95, p99)
- Error Rate - Failed operations over time
- Connection Pool - Active/idle connections
- Retry Metrics - Retry attempts and backoff
MIT License - see LICENSE for details.