Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lukestoward committed Nov 3, 2022
1 parent 83bf151 commit 164fd7b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Added

- `instrumentation/github.com/aws/aws-sdk-go-v2/otelaws`: Add semconv `messaging.url` & `messaging.system` attributes to all supporting SQS operations (#2879).
- Add the `messaging.url` & `messaging.system` attributes to all appropriate SQS operations in the `go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws` package. (#2879)

## [1.11.1/0.36.4/0.5.2]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/aws/smithy-go/middleware"
"github.com/stretchr/testify/assert"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.12.0"
)

func TestSQSDeleteMessageBatchInput(t *testing.T) {
Expand All @@ -35,7 +35,7 @@ func TestSQSDeleteMessageBatchInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSDeleteMessageInput(t *testing.T) {
Expand All @@ -47,7 +47,7 @@ func TestSQSDeleteMessageInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSDeleteQueueInput(t *testing.T) {
Expand All @@ -59,7 +59,7 @@ func TestSQSDeleteQueueInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSGetQueueAttributesInput(t *testing.T) {
Expand All @@ -71,7 +71,7 @@ func TestSQSGetQueueAttributesInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSListDeadLetterSourceQueuesInput(t *testing.T) {
Expand All @@ -83,7 +83,7 @@ func TestSQSListDeadLetterSourceQueuesInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSListQueueTagsInput(t *testing.T) {
Expand All @@ -95,7 +95,7 @@ func TestSQSListQueueTagsInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSPurgeQueueInput(t *testing.T) {
Expand All @@ -107,7 +107,7 @@ func TestSQSPurgeQueueInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSReceiveMessageInput(t *testing.T) {
Expand All @@ -119,7 +119,7 @@ func TestSQSReceiveMessageInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSRemovePermissionInput(t *testing.T) {
Expand All @@ -131,7 +131,7 @@ func TestSQSRemovePermissionInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSSendMessageBatchInput(t *testing.T) {
Expand All @@ -143,7 +143,7 @@ func TestSQSSendMessageBatchInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSSendMessageInput(t *testing.T) {
Expand All @@ -155,7 +155,7 @@ func TestSQSSendMessageInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSSetQueueAttributesInput(t *testing.T) {
Expand All @@ -167,7 +167,7 @@ func TestSQSSetQueueAttributesInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSTagQueueInput(t *testing.T) {
Expand All @@ -179,7 +179,7 @@ func TestSQSTagQueueInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

func TestSQSUntagQueueInput(t *testing.T) {
Expand All @@ -191,5 +191,5 @@ func TestSQSUntagQueueInput(t *testing.T) {

attributes := SQSAttributeSetter(context.TODO(), input)

assert.Contains(t, attributes, attribute.String("messaging.url", "test-queue-url"))
assert.Contains(t, attributes, semconv.MessagingURLKey.String("test-queue-url"))
}

0 comments on commit 164fd7b

Please sign in to comment.