Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 3407552

Browse files
author
Amir Blum
authored
Merge pull request #20 from aspecto-io/sqs-new-spec
fix(opentelemetry-plugin-aws-sdk): add operation to sqs span name
2 parents 83b0035 + 826b797 commit 3407552

File tree

1 file changed

+4
-3
lines changed
  • packages/plugin-aws-sdk/src/services

1 file changed

+4
-3
lines changed

packages/plugin-aws-sdk/src/services/sqs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class SqsServiceExtension implements ServiceExtension {
8989
{
9090
isIncoming = true;
9191
spanKind = SpanKind.CONSUMER;
92-
spanName = queueName;
92+
spanName = `${queueName} receive`;
9393
spanAttributes[SqsAttributeNames.MESSAGING_OPERATION] = "receive";
9494

9595
const params: Record<string, any> = (request as any).params;
@@ -102,7 +102,7 @@ export class SqsServiceExtension implements ServiceExtension {
102102
case "sendMessage":
103103
case "sendMessageBatch":
104104
spanKind = SpanKind.PRODUCER;
105-
spanName = queueName;
105+
spanName = `${queueName} send`;
106106
break;
107107
}
108108

@@ -200,7 +200,8 @@ export class SqsServiceExtension implements ServiceExtension {
200200
} as Link);
201201
}
202202

203-
const messageSpan = this.tracer.startSpan(queueName, {
203+
const spanName = `${queueName} process`;
204+
const messageSpan = this.tracer.startSpan(spanName, {
204205
kind: SpanKind.CONSUMER,
205206
attributes: {
206207
[SqsAttributeNames.MESSAGING_SYSTEM]: "aws.sqs",

0 commit comments

Comments
 (0)