mirror of https://github.com/go-redis/redis.git
docs: Update redisotel example for v9 (#2425)
* docs: Update redisotel docs for v9 Update the redisotel example for v9 to match the example at https://redis.uptrace.dev/guide/go-redis-monitoring.html#what-is-opentelemetry. * docs: Point to correct otel example
This commit is contained in:
parent
fc26460b78
commit
74389af269
|
@ -18,9 +18,17 @@ import (
|
|||
|
||||
rdb := rdb.NewClient(&rdb.Options{...})
|
||||
|
||||
rdb.AddHook(redisotel.NewTracingHook())
|
||||
// Enable tracing instrumentation.
|
||||
if err := redisotel.InstrumentTracing(rdb); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Enable metrics instrumentation.
|
||||
if err := redisotel.InstrumentMetrics(rdb); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
```
|
||||
|
||||
See [example](example) and
|
||||
See [example](../../example/otel) and
|
||||
[Monitoring Go Redis Performance and Errors](https://redis.uptrace.dev/guide/go-redis-monitoring.html)
|
||||
for details.
|
||||
|
|
Loading…
Reference in New Issue