fix(redisotel): fix the situation of reporting spans multiple times

This commit is contained in:
Flc 2024-10-23 19:05:03 +08:00
parent cc9bcb0c0f
commit cc4810cc5a
1 changed files with 0 additions and 4 deletions

View File

@ -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)