From 5314a571322c58b0b8218c1c418fdb7ad3f19c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flc=E3=82=9B?= Date: Thu, 27 Feb 2025 23:14:46 +0800 Subject: [PATCH] fix(redisotel): fix the situation of reporting spans multiple times (#3168) Co-authored-by: Nedyalko Dyakov --- extra/redisotel/tracing.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extra/redisotel/tracing.go b/extra/redisotel/tracing.go index 3d5f3426..33b7abac 100644 --- a/extra/redisotel/tracing.go +++ b/extra/redisotel/tracing.go @@ -30,8 +30,6 @@ 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) @@ -40,8 +38,6 @@ 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)