Skip to content

Commit ec9a74d

Browse files
committed
fix(redisotel): add the namespace attribute
1 parent cc9bcb0 commit ec9a74d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extra/redisotel/tracing.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func InstrumentTracing(rdb redis.UniversalClient, opts ...TracingOption) error {
2727
opt := rdb.Options()
2828
connString := formatDBConnString(opt.Network, opt.Addr)
2929
opts = addServerAttributes(opts, opt.Addr)
30+
opts = append(opts, WithAttributes(semconv.ServiceNamespace(strconv.Itoa(opt.DB))))
3031
rdb.AddHook(newTracingHook(connString, opts...))
3132
return nil
3233
case *redis.ClusterClient:

0 commit comments

Comments
 (0)