You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45f0192
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(aws-lambda): Continue the trace from Invoke ClientContext (#8221)
### Description
With #8117 (merged), a synchronous boto3 `Invoke` carries `sentry-trace`
and `baggage` in `ClientContext.custom`. This PR adds the receiving
side: the Lambda integration continues the trace from
`context.client_context.custom`. `ClientContext` wins over event
headers, because a forwarded HTTP event can still carry headers from
further upstream.
`sam local` drops `ClientContext`, so the new `ClientContextTrace` test
function hands the event's `client_context` to the runtime. That way the
container tests can cover it.
This is Pablo's code from `pablo/aws-lambda-client-context-trace`. The
one change: `client_context` and `custom` are read with `getattr`, so a
context object without them falls back to event headers instead of
failing. It's the first of three stacked PRs for the stretch Lambda
work: this PR → trigger detection (#8222) → `queue.process` spans
(#8223).
#### Issues
* resolves: PY-3009 (receiving side; #8117 does the injection)
* Part of #8071
<!-- junior-request-attribution:start -->
via @dingsdax.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0C9X9V5NMT%3A1793904671.980379 -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0C9X9V5NMT%3A1793904671.980379)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0C9X9V5NMT%3A1793904671.980379/?project=4510944073809921)
<!-- junior-session-footer:end -->
---------
Co-authored-by: Pablo Deputter <pablo.deputter@sentry.io>
Co-authored-by: Pablo Deputter <71842639+pabloDeputter@users.noreply.github.com>
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Johannes Daxböck <114897+dingsdax@users.noreply.github.com>
0 commit comments