Skip to content

Commit 8a2baca

Browse files
committed
[APMSVLS-197] feat: Add fallback to extract trace context from event.request.headers
Add automatic trace context extraction from event.request.headers for AppSync integration scenarios. This eliminates the need for customers to use customized extractors for RUM → AppSync → Lambda resolver flows where RUM-injected trace context is nested under event["request"]["headers"].
1 parent 987c783 commit 8a2baca

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

bottlecap/src/lifecycle/invocation/processor.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,15 @@ impl Processor {
10741074
return Some(sc);
10751075
}
10761076

1077+
if let Some(request_obj) = payload_value.get("request") {
1078+
if let Some(request_headers) = request_obj.get("headers") {
1079+
if let Some(sc) = propagator.extract(request_headers) {
1080+
debug!("Extracted trace context from event.request.headers");
1081+
return Some(sc);
1082+
}
1083+
}
1084+
}
1085+
10771086
None
10781087
}
10791088

0 commit comments

Comments
 (0)