From 97c39495e47a643d9770d5c801051201fc4bf046 Mon Sep 17 00:00:00 2001 From: Allan Guigou <34221163+AllanGuigou@users.noreply.github.com> Date: Tue, 15 Jul 2025 16:10:29 +0000 Subject: [PATCH] Revert "fix(redisotel): fix the situation of reporting spans multiple times (#3168)" This reverts commit 5314a571322c58b0b8218c1c418fdb7ad3f19c9e. --- extra/redisotel/tracing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extra/redisotel/tracing.go b/extra/redisotel/tracing.go index 40df5a202..0a1f3515d 100644 --- a/extra/redisotel/tracing.go +++ b/extra/redisotel/tracing.go @@ -30,6 +30,8 @@ func InstrumentTracing(rdb redis.UniversalClient, opts ...TracingOption) error { rdb.AddHook(newTracingHook(connString, opts...)) return nil case *redis.ClusterClient: + rdb.AddHook(newTracingHook("", opts...)) + rdb.OnNewNode(func(rdb *redis.Client) { opt := rdb.Options() opts = addServerAttributes(opts, opt.Addr) @@ -38,6 +40,8 @@ func InstrumentTracing(rdb redis.UniversalClient, opts ...TracingOption) error { }) return nil case *redis.Ring: + rdb.AddHook(newTracingHook("", opts...)) + rdb.OnNewNode(func(rdb *redis.Client) { opt := rdb.Options() opts = addServerAttributes(opts, opt.Addr)