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

[Bugfix] remove binary _datadog attribute if present in JMS SQS instrumentation to avoid crash #7283

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vandonr
Copy link
Contributor

@vandonr vandonr commented Jul 5, 2024

What Does This Do

Instrument JMS-SQS constructor to remove eventual _datadog binary message attribute that would make the library crash.

Motivation

This situation can happen when clients send messages via SNS, where we have to use binary format to avoid breaking message filtering, and then use JMS to receive those messages through SQS.

Additional Notes

As mentioned as a comment in the code, any meaningful data in _datadog would be used in the awssdk SQS instrumentation, which happens before this instrumentation kicks in, so it's safe to remove that attribute and its content.
If it were to become an issue, we'd have to convert the binary value to a string value instead of removing it.

solves DataDog/dd-trace-js#3549
Jira ticket: AIDM-183

@vandonr vandonr changed the title remove binary datadog attribute if present in JMS SQS instrumentation [Bugfix] remove binary _datadog attribute if present in JMS SQS instrumentation to avoid crash Jul 5, 2024
@vandonr vandonr changed the title [Bugfix] remove binary _datadog attribute if present in JMS SQS instrumentation to avoid crash [Bugfix] remove binary _datadog attribute if present in JMS SQS instrumentation to avoid crash Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant