Skip to content

Commit bab4cfa

Browse files
committed
address code review feedback.
1 parent 696bbb7 commit bab4cfa

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

plugins/node/opentelemetry-instrumentation-aws-sdk/src/semconv.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,12 @@ export const GEN_AI_TOKEN_TYPE_VALUE_INPUT = 'input' as const;
159159
*/
160160
export const GEN_AI_TOKEN_TYPE_VALUE_OUTPUT = 'output' as const;
161161

162-
// Copied ATTR_AWS_SNS_TOPIC_ARN from '@opentelemetry/semantic-conventions/incubating'
162+
/**
163+
* Originally from '@opentelemetry/semantic-conventions/incubating'
164+
* https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-sns-attributes
165+
* The ARN of the AWS SNS Topic. An Amazon SNS [topic](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html)
166+
* is a logical access point that acts as a communication channel.
167+
* @example arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE
168+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
169+
*/
163170
export const ATTR_AWS_SNS_TOPIC_ARN = 'aws.sns.topic.arn' as const;

plugins/node/opentelemetry-instrumentation-aws-sdk/test/sns.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ describe('SNS - v3', () => {
124124
await sns.createTopic({
125125
Name: topicName,
126126
});
127-
const publishSpans = getTestSpans().filter(
127+
const createTopicSpans = getTestSpans().filter(
128128
(s: ReadableSpan) => s.name === 'SNS CreateTopic'
129129
);
130-
expect(publishSpans.length).toBe(1);
131-
const publishSpan = publishSpans[0];
130+
expect(createTopicSpans.length).toBe(1);
131+
const publishSpan = createTopicSpans[0];
132132
expect(publishSpan.attributes[ATTR_AWS_SNS_TOPIC_ARN]).toBe(topicArn);
133133
expect(publishSpan.kind).toBe(SpanKind.CLIENT);
134134
});

0 commit comments

Comments
 (0)