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

SQS span extraction - fallback on AttributeValue if Value is undefined #4290

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

Conversation

leejayhsu
Copy link

@leejayhsu leejayhsu commented May 9, 2024

What does this PR do?

this attempts to fix trace propagation between an SNS producer and SQS consumer. Since the sns plugin is setting the _datadog attribute with a BinaryValue property here, it seems good to check for this property on the sqs side.

Motivation

trace propagation not working for me when publishing with sns and consumer is sqs.

as a workaround, I am currently doing this to propagate between sns and sqs

const datadogAttribute = message.MessageAttributes._datadog
const buffer = Buffer.from(datadogAttribute.BinaryValue, 'base64')
const parsedAttributes = JSON.parse(buffer)
tracer.extract('text_map', parsedAttributes)

Additional Notes

no additional notes

@leejayhsu leejayhsu changed the title fallback on AttributeValue if Value is undefined SQS span extraction - fallback on AttributeValue if Value is undefined May 9, 2024
@leejayhsu leejayhsu marked this pull request as ready for review May 9, 2024 06:43
@leejayhsu leejayhsu requested review from a team as code owners May 9, 2024 06:43
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