1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-15 12:41:41 +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

@ -10,7 +10,7 @@ import (
"github.com/go-redis/redis/v8/internal"
"github.com/go-redis/redis/v8/internal/pool"
"github.com/go-redis/redis/v8/internal/proto"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
)
@ -296,7 +296,7 @@ func (c *baseClient) withConn(
if span.IsRecording() {
if remoteAddr := cn.RemoteAddr(); remoteAddr != nil {
span.SetAttributes(label.String("net.peer.ip", remoteAddr.String()))
span.SetAttributes(attribute.String("net.peer.ip", remoteAddr.String()))
}
}