diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go index ab091cf6ade..e094b099c2c 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -11,7 +11,7 @@ import ( "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/propagation" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go index 7d5ed058082..5c4631c53c7 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" ) @@ -479,13 +479,13 @@ func peerAttr(addr string) []attribute.KeyValue { var attr []attribute.KeyValue if ip := net.ParseIP(host); ip != nil { attr = []attribute.KeyValue{ - semconv.NetSockPeerAddr(host), - semconv.NetSockPeerPort(port), + semconv.NetworkPeerAddress(host), + semconv.NetworkPeerPort(port), } } else { attr = []attribute.KeyValue{ - semconv.NetPeerName(host), - semconv.NetPeerPort(port), + semconv.NetworkPeerAddress(host), + semconv.NetworkPeerPort(port), } } diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go b/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go index bef07b7a3ca..fde6ad16f4c 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go @@ -7,7 +7,7 @@ import ( "strings" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) // ParseFullMethod returns a span name following the OpenTelemetry semantic diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse_test.go index aa52757a9f7..119d7910e51 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse_test.go @@ -7,7 +7,7 @@ import ( "testing" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "github.com/stretchr/testify/assert" ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go b/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go index 409c621b74c..89303cedf5c 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/semconv.go @@ -5,7 +5,7 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g import ( "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) // Semantic conventions for attribute keys for gRPC. diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go index 201867a8694..ebc210c76fb 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go @@ -17,7 +17,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" ) @@ -157,10 +157,10 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool if c.ReceivedEvent { span.AddEvent("message", trace.WithAttributes( - semconv.MessageTypeReceived, - semconv.MessageIDKey.Int64(messageId), - semconv.MessageCompressedSizeKey.Int(rs.CompressedLength), - semconv.MessageUncompressedSizeKey.Int(rs.Length), + semconv.MessagingOperationTypeReceive, + semconv.MessagingMessageIDKey.Int64(messageId), + semconv.RPCMessageCompressedSize(rs.CompressedLength), + semconv.RPCMessageUncompressedSize(rs.Length), ), ) } @@ -173,10 +173,10 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool if c.SentEvent { span.AddEvent("message", trace.WithAttributes( - semconv.MessageTypeSent, - semconv.MessageIDKey.Int64(messageId), - semconv.MessageCompressedSizeKey.Int(rs.CompressedLength), - semconv.MessageUncompressedSizeKey.Int(rs.Length), + semconv.RPCMessageTypeSent, + semconv.MessagingMessageIDKey.Int64(messageId), + semconv.RPCMessageCompressedSize(rs.CompressedLength), + semconv.RPCMessageUncompressedSize(rs.Length), ), ) } diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_stats_handler_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_stats_handler_test.go index 7d951d6b2a3..e2f38c7e795 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_stats_handler_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_stats_handler_test.go @@ -29,7 +29,7 @@ import ( "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" testpb "google.golang.org/grpc/interop/grpc_testing" ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go index 42f4e368deb..55e968a4cca 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" pb "google.golang.org/grpc/interop/grpc_testing" ) diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/interceptor_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/interceptor_test.go index f264e470f28..9eaac809679 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/interceptor_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/interceptor_test.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" oteltrace "go.opentelemetry.io/otel/trace" "github.com/stretchr/testify/assert" diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/stats_handler_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/stats_handler_test.go index be2d0c2472a..60ca874cb34 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/test/stats_handler_test.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/stats_handler_test.go @@ -20,7 +20,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" - semconv "go.opentelemetry.io/otel/semconv/v1.17.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) func TestStatsHandlerHandleRPCServerErrors(t *testing.T) {