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:
4
redis.go
4
redis.go
@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user