Skip to content

redis-developer/redis-client-observability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis Client Observability

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.

Features

  • 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

🚀 Quick Start

Prerequisites

  • 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)

1. Start the Observability Stack

# Start all services
make start

# Check status
make status

This starts:

  • OpenTelemetry Collector on ports 4317 (gRPC) and 4318 (HTTP)
  • Prometheus on port 9090
  • Grafana on port 3000

2. Access Grafana

Open http://localhost:3000

  • Username: admin
  • Password: admin

Navigate to DashboardsRedis folder to see the pre-built dashboard.

3. Run Example Applications

Python Example (redis-py):

cd examples/python
pip install -r requirements.txt
python main.py

Go Example (go-redis):

cd examples/go
go mod download
go run main.go

Both examples will:

  • Connect to Redis on localhost:6379
  • Send metrics to the OTLP collector
  • Execute various Redis operations
  • Export metrics every 10 seconds

📚 Supported Client Libraries

This observability stack works with Redis client libraries that have OpenTelemetry support:

More client libraries coming soon!

📊 Grafana Dashboards

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

📝 License

MIT License - see LICENSE for details.

About

A helper repository for exploring Redis client observability with OpenTelemetry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors