From e6803b2dfc34833f5beb0753a50c36fd36ff2677 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 28 May 2025 14:20:37 -0700 Subject: [PATCH 1/4] Upgrade semconv to v1.32.0 in otelaws --- .../aws/aws-sdk-go-v2/otelaws/attributes.go | 2 +- .../aws-sdk-go-v2/otelaws/attributes_test.go | 6 ++-- .../aws/aws-sdk-go-v2/otelaws/aws.go | 4 +-- .../otelaws/dynamodbattributes.go | 4 +-- .../aws-sdk-go-v2/otelaws/snsattributes.go | 2 +- .../otelaws/snsattributes_test.go | 2 +- .../aws-sdk-go-v2/otelaws/sqsattributes.go | 33 +++++++++---------- .../otelaws/sqsattributes_test.go | 30 ++++++++--------- 8 files changed, 41 insertions(+), 42 deletions(-) diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go index 874d7033b2a..12426f137a9 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes.go @@ -13,7 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) // AWS attributes. diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go index 512b6d1ab38..d2531b1e342 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/attributes_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) func TestOperationAttr(t *testing.T) { @@ -62,7 +62,7 @@ func TestDefaultAttributeBuilderOnSupportedService(t *testing.T) { }, }, middleware.InitializeOutput{}) assert.ElementsMatch(t, []attribute.KeyValue{ - semconv.MessagingSystem("AmazonSQS"), - semconv.NetPeerName(testQueueURL), + semconv.MessagingSystemAWSSQS, + semconv.ServerAddress(testQueueURL), }, attr) } diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go index acf48dc54ae..4f8577d17a3 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/aws.go @@ -16,7 +16,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/propagation" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" "go.opentelemetry.io/otel/trace" ) @@ -112,7 +112,7 @@ func (m otelMiddlewares) deserializeMiddleware(stack *middleware.Stack) error { } span := trace.SpanFromContext(ctx) - span.SetAttributes(semconv.HTTPStatusCode(resp.StatusCode)) + span.SetAttributes(semconv.HTTPResponseStatusCode(resp.StatusCode)) requestID, ok := v2Middleware.GetRequestIDMetadata(metadata) if ok { diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go index 2bd8f35725b..0229d8c0c4c 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/dynamodbattributes.go @@ -11,12 +11,12 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) // DynamoDBAttributeBuilder sets DynamoDB specific attributes depending on the DynamoDB operation being performed. func DynamoDBAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue { - dynamodbAttributes := []attribute.KeyValue{semconv.DBSystemDynamoDB} + dynamodbAttributes := []attribute.KeyValue{semconv.DBSystemNameAWSDynamoDB} switch v := in.Parameters.(type) { case *dynamodb.GetItemInput: diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go index 77d67b01894..1daae657ded 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go @@ -11,7 +11,7 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.27.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) // SNSAttributeBuilder sets SNS specific attributes depending on the SNS operation is being performed. diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go index cc6a59d75f6..7f1368edd07 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go @@ -13,7 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/stretchr/testify/assert" - semconv "go.opentelemetry.io/otel/semconv/v1.27.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) func TestPublishInput(t *testing.T) { diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go index 8225a7c8f3e..163443d0dee 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes.go @@ -10,43 +10,42 @@ import ( "github.com/aws/smithy-go/middleware" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) // SQSAttributeBuilder sets SQS specific attributes depending on the SQS operation being performed. func SQSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out middleware.InitializeOutput) []attribute.KeyValue { - sqsAttributes := []attribute.KeyValue{semconv.MessagingSystem("AmazonSQS")} + sqsAttributes := []attribute.KeyValue{semconv.MessagingSystemAWSSQS} - key := semconv.NetPeerNameKey switch v := in.Parameters.(type) { case *sqs.DeleteMessageBatchInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.DeleteMessageInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.DeleteQueueInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.GetQueueAttributesInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.ListDeadLetterSourceQueuesInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.ListQueueTagsInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.PurgeQueueInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.ReceiveMessageInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.RemovePermissionInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.SendMessageBatchInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.SendMessageInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.SetQueueAttributesInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.TagQueueInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) case *sqs.UntagQueueInput: - sqsAttributes = append(sqsAttributes, key.String(*v.QueueUrl)) + sqsAttributes = append(sqsAttributes, semconv.ServerAddress(*v.QueueUrl)) } return sqsAttributes diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go index 23fa889d165..682ffc34969 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/sqsattributes_test.go @@ -12,7 +12,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/stretchr/testify/assert" - semconv "go.opentelemetry.io/otel/semconv/v1.21.0" + semconv "go.opentelemetry.io/otel/semconv/v1.32.0" ) func TestSQSDeleteMessageBatchInput(t *testing.T) { @@ -24,7 +24,7 @@ func TestSQSDeleteMessageBatchInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSDeleteMessageInput(t *testing.T) { @@ -36,7 +36,7 @@ func TestSQSDeleteMessageInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSDeleteQueueInput(t *testing.T) { @@ -48,7 +48,7 @@ func TestSQSDeleteQueueInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSGetQueueAttributesInput(t *testing.T) { @@ -60,7 +60,7 @@ func TestSQSGetQueueAttributesInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSListDeadLetterSourceQueuesInput(t *testing.T) { @@ -72,7 +72,7 @@ func TestSQSListDeadLetterSourceQueuesInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSListQueueTagsInput(t *testing.T) { @@ -84,7 +84,7 @@ func TestSQSListQueueTagsInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSPurgeQueueInput(t *testing.T) { @@ -96,7 +96,7 @@ func TestSQSPurgeQueueInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSReceiveMessageInput(t *testing.T) { @@ -108,7 +108,7 @@ func TestSQSReceiveMessageInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSRemovePermissionInput(t *testing.T) { @@ -120,7 +120,7 @@ func TestSQSRemovePermissionInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSSendMessageBatchInput(t *testing.T) { @@ -132,7 +132,7 @@ func TestSQSSendMessageBatchInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSSendMessageInput(t *testing.T) { @@ -144,7 +144,7 @@ func TestSQSSendMessageInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSSetQueueAttributesInput(t *testing.T) { @@ -156,7 +156,7 @@ func TestSQSSetQueueAttributesInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSTagQueueInput(t *testing.T) { @@ -168,7 +168,7 @@ func TestSQSTagQueueInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } func TestSQSUntagQueueInput(t *testing.T) { @@ -180,5 +180,5 @@ func TestSQSUntagQueueInput(t *testing.T) { attributes := SQSAttributeBuilder(context.TODO(), input, middleware.InitializeOutput{}) - assert.Contains(t, attributes, semconv.NetPeerName("test-queue-url")) + assert.Contains(t, attributes, semconv.ServerAddress("test-queue-url")) } From 7249bf4fb79ee98261dd8a4a5592602d4018542c Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 28 May 2025 17:06:29 -0700 Subject: [PATCH 2/4] Replace deprecated MessagingOperationTypePublish Replace with MessagingOperationTypeSend --- .../github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go | 4 ++-- .../aws/aws-sdk-go-v2/otelaws/snsattributes_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go index 1daae657ded..194ae9b0003 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes.go @@ -22,14 +22,14 @@ func SNSAttributeBuilder(ctx context.Context, in middleware.InitializeInput, out case *sns.PublishBatchInput: snsAttributes = append(snsAttributes, semconv.MessagingDestinationName(extractDestinationName(v.TopicArn, nil)), - semconv.MessagingOperationTypePublish, + semconv.MessagingOperationTypeSend, semconv.MessagingOperationName("publish_batch_input"), semconv.MessagingBatchMessageCount(len(v.PublishBatchRequestEntries)), ) case *sns.PublishInput: snsAttributes = append(snsAttributes, semconv.MessagingDestinationName(extractDestinationName(v.TopicArn, v.TargetArn)), - semconv.MessagingOperationTypePublish, + semconv.MessagingOperationTypeSend, semconv.MessagingOperationName("publish_input"), ) } diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go index 7f1368edd07..f777468f4e0 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/snsattributes_test.go @@ -28,7 +28,7 @@ func TestPublishInput(t *testing.T) { assert.Contains(t, attributes, semconv.MessagingSystemKey.String("aws_sns")) assert.Contains(t, attributes, semconv.MessagingDestinationName("my-topic")) assert.Contains(t, attributes, semconv.MessagingOperationName("publish_input")) - assert.Contains(t, attributes, semconv.MessagingOperationTypePublish) + assert.Contains(t, attributes, semconv.MessagingOperationTypeSend) } func TestPublishInputWithNoDestination(t *testing.T) { @@ -41,7 +41,7 @@ func TestPublishInputWithNoDestination(t *testing.T) { assert.Contains(t, attributes, semconv.MessagingSystemKey.String("aws_sns")) assert.Contains(t, attributes, semconv.MessagingDestinationName("")) assert.Contains(t, attributes, semconv.MessagingOperationName("publish_input")) - assert.Contains(t, attributes, semconv.MessagingOperationTypePublish) + assert.Contains(t, attributes, semconv.MessagingOperationTypeSend) } func TestPublishBatchInput(t *testing.T) { @@ -57,6 +57,6 @@ func TestPublishBatchInput(t *testing.T) { assert.Contains(t, attributes, semconv.MessagingSystemKey.String("aws_sns")) assert.Contains(t, attributes, semconv.MessagingDestinationName("my-topic-batch")) assert.Contains(t, attributes, semconv.MessagingOperationName("publish_batch_input")) - assert.Contains(t, attributes, semconv.MessagingOperationTypePublish) + assert.Contains(t, attributes, semconv.MessagingOperationTypeSend) assert.Contains(t, attributes, semconv.MessagingBatchMessageCount(0)) } From 76675708489c166cacfa86bb5726d3da3fe87f8e Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 28 May 2025 17:08:20 -0700 Subject: [PATCH 3/4] Update test module --- .../github.com/aws/aws-sdk-go-v2/otelaws/test/aws_test.go | 2 +- .../aws/aws-sdk-go-v2/otelaws/test/dynamodbattributes_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/aws_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/aws_test.go index 3074f10121d..c4a1cfaff6e 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/aws_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/aws_test.go @@ -137,7 +137,7 @@ func TestAppendMiddlewares(t *testing.T) { assert.Equal(t, trace.SpanKindClient, span.SpanKind()) assert.Equal(t, c.expectedError, span.Status().Code) attrs := span.Attributes() - assert.Contains(t, attrs, attribute.Int("http.status_code", c.expectedStatusCode)) + assert.Contains(t, attrs, attribute.Int("http.response.status_code", c.expectedStatusCode)) if c.expectedRequestID != "" { assert.Contains(t, attrs, attribute.String("aws.request_id", c.expectedRequestID)) } diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/dynamodbattributes_test.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/dynamodbattributes_test.go index 1be57596f56..6765b64ddc8 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/dynamodbattributes_test.go +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/dynamodbattributes_test.go @@ -92,7 +92,7 @@ func TestDynamodbTags(t *testing.T) { assert.Equal(t, "DynamoDB.GetItem", span.Name()) assert.Equal(t, trace.SpanKindClient, span.SpanKind()) attrs := span.Attributes() - assert.Contains(t, attrs, attribute.Int("http.status_code", cases.expectedStatusCode)) + assert.Contains(t, attrs, attribute.Int("http.response.status_code", cases.expectedStatusCode)) assert.Contains(t, attrs, attribute.String("rpc.service", "DynamoDB")) assert.Contains(t, attrs, attribute.String("aws.region", cases.expectedRegion)) assert.Contains(t, attrs, attribute.String("rpc.method", "GetItem")) @@ -174,7 +174,7 @@ func TestDynamodbTagsCustomBuilder(t *testing.T) { assert.Equal(t, "DynamoDB.GetItem", span.Name()) assert.Equal(t, trace.SpanKindClient, span.SpanKind()) attrs := span.Attributes() - assert.Contains(t, attrs, attribute.Int("http.status_code", cases.expectedStatusCode)) + assert.Contains(t, attrs, attribute.Int("http.response.status_code", cases.expectedStatusCode)) assert.Contains(t, attrs, attribute.String("rpc.service", "DynamoDB")) assert.Contains(t, attrs, attribute.String("aws.region", cases.expectedRegion)) assert.Contains(t, attrs, attribute.String("rpc.method", "GetItem")) From bb5494e3b5bc0ce7ef142c36cc2c4a364d19993b Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Wed, 28 May 2025 17:09:58 -0700 Subject: [PATCH 4/4] Add a changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a591d0a6e5..4eb555156a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The semantic conventions have been upgraded from `v1.30.0` to `v1.33.0` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. (#7361) - The semantic conventions have been upgraded from `v1.26.0` to `v1.32.0` in `go.opentelemetry.io/contrib/detectors/aws/ec2`. (#7373) - The semantic conventions have been upgraded from `v1.26.0` to `v1.32.0` in `go.opentelemetry.io/contrib/detectors/aws/lambda`. (#7376) +- The semantic conventions have been upgraded in `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws` to `v1.32.0`. (#7394) + - The `messaging.system=AmazonSQS` attribute has been corrected to `messaging.system=aws.sqs`. + - The `net.peer.addr` attribute key has been upgraded to `server.address`. + - The `http.status_code` attribute key has been upgraded to `http.response.status_code`. + - The `db.system=dynamodb` attribute has been corrected to `db.system.name=aws.dynamodb`. + - The deprecated `messaging.operation.type=publish` attribute has been corrected to `messaging.operation.type=send`. ### Fixed