example/otel/README.md
This example demonstrates how to instrument and monitor Redis operations in Go applications using OpenTelemetry and Uptrace, providing comprehensive observability into your Redis performance and operations.
This integration provides:
git clone https://github.com/redis/go-redis.git
cd example/otel
Launch Redis and Uptrace services:
docker compose up -d
This starts:
localhost:6379http://localhost:14318Check that Uptrace is running properly:
docker compose logs uptrace
Look for successful startup messages without errors.
Execute the instrumented Redis client:
go run client.go
You should see output similar to:
trace: http://localhost:14318/traces/ee029d8782242c8ed38b16d961093b35
Click the trace URL to view detailed operation traces in Uptrace.
Open the Uptrace UI at http://localhost:14318 to explore:
For production environments, enable comprehensive Redis monitoring by installing the OpenTelemetry Collector:
The OpenTelemetry Collector acts as a telemetry agent that:
When configured, Uptrace automatically generates a Redis dashboard:
View service logs:
# All services
docker compose logs
# Specific service
docker compose logs redis
docker compose logs uptrace