cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Traces not linked across AWS lambdas

DamianJankowski
Participant

Hi,

I'm working on an AWS setup with otel. Here's a quick overview of my architecture:

Postman (with traceparent header)
→ API Gateway
→ Lambda (1)
→ EventBridge
→ Lambda (2)

Each Lambda uses the Dynatrace Lambda Layer for auto-instrumentation.

When I trigger the full flow — meaning the request goes through the entire setup — separate traces are created for each Lambda function. They're not connected into a single, end-to-end trace.

I’ve tried adding manual Span Links. In the lambda 1, I can see the full path:
API Gateway → Lambda 1 → EventBridge → Lambda 2.
However, the lambda 2 always shows up as a new root trace (just labeled as "invoked").

I also disabled the default Dynatrace integration using DT_OPEN_TELEMETRY_ENABLE_INTEGRATION=false and manually propagated the traceparent header, hoping to gain full control. But the traces are still not connected.

Has anyone deal with that kind of issue? Any help or tips would be greatly appreciated!

 

2 REPLIES 2

marco_irmer
Champion

Are you invoking Lambda2 directly from Lambda1 (via hTTP), or are you sending an event to EventBridge and then triggering invocation of Lambda2 via event? I believe this question is important because the documentation for tracing Lambda functions only seems to mention HTTP requests as a method for tracing across multiple Lambda functions.

Hi, 

I am not invoking lambda 2 directly from lambda 1. Instead lambda 1 publish event to event bridge which is consumed by lambda 2. 

Yep, trace context is not automatically propagate when I am using async service like event bridge, but the case here is that also work strange when i am trying different approach which should works, so I’ve tried adding manual Span Links. In the lambda 1, I can see the full path: API Gateway → Lambda 1 → EventBridge → Lambda 2. However, the lambda 2 always shows up as a new root trace (just labeled as "invoked").Screenshot 2025-05-30 at 10.10.18.png

so you can get the e2e trace, but when you look at lambda 2 in isolation, there’s no context — and that’s not great. Even with manual propagation of traceparent, dynatrace doesn't stitch everything into one distributed trace — the functions still appear disconnected.

Featured Posts