Skip to content

Commit

Permalink
fix(instrumentation-aws-sdk): dedupe prop fields
Browse files Browse the repository at this point in the history
Co-authored-by: Kent Quirk <[email protected]>
Co-authored-by: Purvi Kanal <[email protected]>
Co-authored-by: Mike Goldsmith <[email protected]>
  • Loading branch information
4 people committed May 31, 2022
1 parent 3e2f9c5 commit b0fed52
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ 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()]));
}
break;

Expand Down

0 comments on commit b0fed52

Please sign in to comment.