1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

change otel/label for otel/attribute

This commit is contained in:
lawmatsuyama
2021-03-03 22:43:10 -03:00
parent aaed549e26
commit dd7fefe738
5 changed files with 20 additions and 13 deletions

View File

@ -14,7 +14,7 @@ import (
"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v8/internal/pool"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
@ -295,7 +295,7 @@ func newConnPool(opt *Options) *pool.ConnPool {
var conn net.Conn
err := internal.WithSpan(ctx, "redis.dial", func(ctx context.Context, span trace.Span) error {
span.SetAttributes(
label.String("db.connection_string", opt.Addr),
attribute.String("db.connection_string", opt.Addr),
)
var err error