Skip to content

Commit 74389af

Browse files
authored
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
1 parent fc26460 commit 74389af

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

extra/redisotel/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,17 @@ import (
1818

1919
rdb := rdb.NewClient(&rdb.Options{...})
2020

21-
rdb.AddHook(redisotel.NewTracingHook())
21+
// Enable tracing instrumentation.
22+
if err := redisotel.InstrumentTracing(rdb); err != nil {
23+
panic(err)
24+
}
25+
26+
// Enable metrics instrumentation.
27+
if err := redisotel.InstrumentMetrics(rdb); err != nil {
28+
panic(err)
29+
}
2230
```
2331

24-
See [example](example) and
32+
See [example](../../example/otel) and
2533
[Monitoring Go Redis Performance and Errors](https://redis.uptrace.dev/guide/go-redis-monitoring.html)
2634
for details.

0 commit comments

Comments
 (0)