-
Notifications
You must be signed in to change notification settings - Fork 347
Description
At Lattice, we've been having issues with DD distributed traces and AWS SQS. Even though we see all of the aws.request
spans created, none of them are connected to parent spans or the trace that created them in the first place. Finally after some digging / tracing I think I may know what it is.
We use sqs-consumer
for managing our SQS queues. Looking the SQS dd-trace-js code, the extraction of the trace info happens at responseExtract
. And that is ever called from wrapCb
. And that is only called when there is a callback to wrap. But sqs-consumer
uses the .promise()
style of making requests to AWS. Which, as far as I can tell, makes it so the cb
is undefined
and makes it so we never call responseExtract
.
Do you think I got that right? And if so do you know of another library that has this pattern that I could try and copy from to open a PR to fix?
Cheers!
Eric