redis/example/otel
Vladimir Mihailenco 104c757027 chore: improve docker config 2022-10-16 12:12:35 +03:00
..
README.md chore: update example 2022-10-16 11:28:12 +03:00
client.go chore: improve OpenTelemetry example 2022-10-16 11:11:54 +03:00
docker-compose.yml chore: improve docker config 2022-10-16 12:12:35 +03:00
go.mod chore: release v9.0.0-rc.1 (release.sh) 2022-10-14 15:19:56 +03:00
go.sum feat: add OpenTelemetry metrics instrumentation 2022-10-12 11:09:41 +03:00
otel-collector.yaml chore: improve OpenTelemetry example 2022-10-16 11:11:54 +03:00
uptrace.yml chore: improve docker config 2022-10-16 12:12:35 +03:00
vector.toml chore: improve OpenTelemetry example 2022-10-16 11:11:54 +03:00

README.md

Example for go-redis OpenTelemetry instrumentation

This example demonstrates how to monitor Redis using OpenTelemetry and Uptrace. It requires Docker to start Redis Server and Uptrace.

See Monitoring Go Redis Performance and Errors for details.

Step 1. Download the example using Git:

git clone https://github.com/go-redis/redis.git
cd example/otel

Step 2. Start the services using Docker:

docker-compose pull
docker-compose up -d

Step 3. Make sure Uptrace is running:

docker-compose logs uptrace

Step 4. Run the Redis client example:

UPTRACE_DSN=http://project2_secret_token@localhost:14317/2 go run client.go

Step 5. Follow the link from the CLI to view the trace:

UPTRACE_DSN=http://project2_secret_token@localhost:14317/2 go run client.go
trace: http://localhost:14318/traces/ee029d8782242c8ed38b16d961093b35

You can also open Uptrace UI at http://localhost:14318 to view available spans, logs, and metrics.