redis/example/otel
dependabot[bot] fc4c8bd2f7
chore(deps): bump golang.org/x/net in /example/otel (#3000)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monkey <golang@88.com>
2024-06-21 09:58:08 +08:00
..
config chore: update OpenTelemetry and Uptrace to the latest version (#2864) 2024-01-23 13:09:47 +02:00
image chore: update otel example 2022-11-09 15:16:13 +02:00
README.md chore: update import path 2023-01-23 08:48:54 +02:00
client.go chore: update import path 2023-01-23 08:48:54 +02:00
docker-compose.yml chore: update OpenTelemetry and Uptrace to the latest version (#2864) 2024-01-23 13:09:47 +02:00
go.mod chore(deps): bump golang.org/x/net in /example/otel (#3000) 2024-06-21 09:58:08 +08:00
go.sum chore(deps): bump golang.org/x/net in /example/otel (#3000) 2024-06-21 09:58:08 +08:00
uptrace.yml chore: update OpenTelemetry and Uptrace to the latest version (#2864) 2024-01-23 13:09:47 +02: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/redis/go-redis.git
cd example/otel

Step 2. Start the services using Docker:

docker-compose up -d

Step 3. Make sure Uptrace is running:

docker-compose logs uptrace

Step 4. Run the Redis client example and Follow the link to view the trace:

go run client.go
trace: http://localhost:14318/traces/ee029d8782242c8ed38b16d961093b35

Redis trace

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

Redis monitoring

You can also monitor Redis performance metrics By installing OpenTelemetry Collector.

OpenTelemetry Collector is an agent that pulls telemetry data from systems you want to monitor and sends it to APM tools using the OpenTelemetry protocol (OTLP).

When telemetry data reaches Uptrace, it automatically generates a Redis dashboard from a pre-defined template.

Redis dashboard