open-telemetry / open-telemetry/opentelemetry-lambda

Distributed traces across AWS services are not connected

Open
#1,787 31 comments 3 reactions 1 assignee View on GitHub

@wpessers is already working on this.

Since Jun 4, 2025.

bug
Dominant language
Go
Stars
432
Forks
246
Avg merge
3d 10h
Merged PRs (30d)
47

Description

Describe the bug
We are using SQS and EventBridge to call services on AWS. However, when a service on lambda sends a message to another service on Lambda using SQS the spans are not connected. Trace on lambda becomes the parent.

Steps to reproduce
Run service 1 on lambda and send SQS message that is consumed by service 2.

What did you expect to see?
Service 1 should show up in the trace.

What did you see instead?
Only service 2 shows up

What version of collector/language SDK version did you use?
Version: latest collector and otel layers on lambda.

What language layer did you use?
Nodejs

Additional context
OTEL_PROPAGATORS are set to tracecontext,baggage,xray. Backend is Tempo.
Is there something I am missing?
I can see traceheader in the message attributes

"attributes": {
                    "ApproximateReceiveCount": "1",
                    "AWSTraceHeader": "Root=1-6808be41-c7d04735710d987017e5ec88;Parent=371ec507158784ee;Sampled=0;Lineage=240:e7ff9e16:238",
                    "SentTimestamp": "1745403457578",
                    "SenderId": "id",
                    "ApproximateFirstReceiveTimestamp": "1745403457579"
                },

Is it because I need sqsExtractContextPropagationFromPayload enabled? How could I do that without creating my own custom instrumentation layer?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.