-
Notifications
You must be signed in to change notification settings - Fork 550
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
Trace ID is not propagated from SQS message with AWSXRayPropagator #1149
Comments
Hi @dyladan - is there any chance we could add an |
I added labels for each of the components. Attaching them to this issue as well - perhaps that will help you filter out what you are looking for. |
Thanks! This is perfect, we will have someone follow up here. |
Hi @willarmiros can I expect any update on this? |
@mentos1386 I see you wrote the case that parses |
@carolabadeer I'm not entirely sure why it's used. I was only touching the code enough to add the missing message id attribute. This might be a good read #707, i think i remember also seeing a lengthier discussion on this topic somewhere but can't find it atm. We solved this issue by implementing our own propagation by injecting/extracting traces from message payload that we control. This way SQS traces are only "transport layer" traces, and the actual cross service communication propagation is handled by us. It works good enough for us, but it would be nice if we wouldn't have to do it. |
This is the workaround that I tried and described in the post. I could keep the additional "transport layer" trace of SQS, but the problem is that the App that processes the received message does not appear on the service graph. Did you manage to get it displayed there, or does your service graph look like the one I posted, with one App and SQS nodes on it? The perfect solution would be obviously to have those automatically created spans to be included in the same trace, but they seem to ignore the trace ID header set in the message attribute. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Hey @willarmiros, is there any chance this will be resolved, or is there any workaround to generate correct service maps and consistent traces with SQS using OTEL and XRay? |
Hi @sssmolarkiewicz, this gap is on our roadmap and we will use this issue to post and track updates once we are able to prioritize it |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Was there any progress made on this? I have the same issue, but with the Python SDK. |
What version of OpenTelemetry are you using?
What version of Node are you using?
16.17.0
What did you do?
I've configured tracer with
AWSXRayIdGenerator
andAWSXRayPropagator
in my two applications AppA and AppB. The applications communicate over SQS. I've triggered producing a message in AppA through a HTTP request, and received the message in AppB. In AppB I am able to seex-amzn-trace-id
message attribute set in the received message.Collector runs as a sidecar container in ECS task within each service. Here is my tracer configuration (it's the same in both apps):
What did you expect to see?
I expect to see one trace consisting of the spans for HTTP request and producing message in AppA and receiving the message in AppB.
What did you see instead?
I have two traces, one with HTTP request and producing message in AppA and the second with receiving the message in AppB.
Additional context
I am able to extract the trace ID from the message attribute and create a span with this trace ID with the code below. However, I have following problems with this approach:
If it matters I use NestJS and @nestjs-packages/sqs.
Here is the trace generated with this approach - no AppB in service map, a separate trace for AppB is also created (AppB produces another message to AppA, hence a second
![Zrzut ekranu z 2022-09-02 13-09-31](https://user-images.githubusercontent.com/100124335/188128135-4549406a-7d89-4081-9caa-fb1898fed514.png)
![Zrzut ekranu z 2022-09-02 13-14-28](https://user-images.githubusercontent.com/100124335/188128158-0013300b-9674-42b2-9884-85ec77c4ce58.png)
handle
in the trace):The text was updated successfully, but these errors were encountered: