cleanup trace spans
Some checks failed
build / lint (push) Successful in 24s
build / test (push) Failing after 1m25s
codeql / analyze (go) (push) Failing after 1m53s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-07-05 23:11:12 +03:00
parent b263e14032
commit 2f3951773f

View File

@ -18,14 +18,12 @@ func setTracing(rdb redis.UniversalClient, tr tracer.Tracer, opts ...tracer.Span
connString := formatDBConnString(opt.Network, opt.Addr)
rdb.AddHook(newTracingHook(connString, tr))
case *redis.ClusterClient:
rdb.AddHook(newTracingHook("", tr, opts...))
rdb.OnNewNode(func(rdb *redis.Client) {
opt := rdb.Options()
connString := formatDBConnString(opt.Network, opt.Addr)
rdb.AddHook(newTracingHook(connString, tr))
})
case *redis.Ring:
rdb.AddHook(newTracingHook("", tr, opts...))
rdb.OnNewNode(func(rdb *redis.Client) {
opt := rdb.Options()
connString := formatDBConnString(opt.Network, opt.Addr)