From e69b8ba12dbd62dac3e75aa7a9ba0d4df81dd5b7 Mon Sep 17 00:00:00 2001 From: kason Date: Mon, 6 Feb 2023 12:45:54 -0700 Subject: [PATCH 1/2] 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. --- extra/redisotel/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extra/redisotel/README.md b/extra/redisotel/README.md index 44b5e2077..83a5b3a95 100644 --- a/extra/redisotel/README.md +++ b/extra/redisotel/README.md @@ -18,7 +18,15 @@ 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 From 37082b02860144de8a53d2f0346a5d874294f60c Mon Sep 17 00:00:00 2001 From: kason Date: Mon, 6 Feb 2023 12:52:41 -0700 Subject: [PATCH 2/2] docs: Point to correct otel example --- extra/redisotel/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/redisotel/README.md b/extra/redisotel/README.md index 83a5b3a95..997c17d1c 100644 --- a/extra/redisotel/README.md +++ b/extra/redisotel/README.md @@ -29,6 +29,6 @@ if err := redisotel.InstrumentMetrics(rdb); err != nil { } ``` -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.