Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aws-sdk): avoid repeating MessageAttributeNames in sqs receiveMessage #1044

Merged
merged 12 commits into from
Jun 10, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ export class SqsServiceExtension implements ServiceExtension {
spanAttributes[SemanticAttributes.MESSAGING_OPERATION] =
MessagingOperationValues.RECEIVE;

request.commandInput.MessageAttributeNames = (
request.commandInput.MessageAttributeNames ?? []
).concat(propagation.fields());
request.commandInput.MessageAttributeNames = Array.from(
new Set([
...(request.commandInput.MessageAttributeNames ?? []),
...propagation.fields(),
])
);
blumamir marked this conversation as resolved.
Show resolved Hide resolved
}
break;

Expand Down