Skip to content

fix(aws-serverless): End the function.aws span when a callback-style handler calls back - #25543

Merged
JPeer264 merged 2 commits into
getsentry:developfrom
4ktLuffy:fix/aws-lambda-callback-span
Oct 21, 2026
Merged

JPeer264 merged 2 commits into
getsentry:developfrom
4ktLuffy:fix/aws-lambda-callback-span

Conversation

@4ktLuffy

Copy link
Copy Markdown
Contributor

For callback-style handlers the function.aws span ended as soon as the handler returned, so it had ~0 ms duration and ok status even when callback(err) came later. If the handler takes a callback and doesn't return a promise, the span is now ended by the wrapped callback instead. Tests call back from a setTimeout with a result and with an error.

@4ktLuffy
4ktLuffy requested a review from a team as a code owner October 19, 2026 19:18
@4ktLuffy
4ktLuffy requested review from JPeer264 and mydea and removed request for a team October 19, 2026 19:18
@github-actions github-actions Bot added the external PR from an external contributor label Oct 19, 2026

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing that. I added an E2E test for it that is also covered there

@JPeer264

Copy link
Copy Markdown
Member

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit dd043a5. Configure here.

@JPeer264
JPeer264 merged commit 3dac8ea into getsentry:develop Oct 21, 2026
617 of 620 checks passed
nicohrubec pushed a commit that referenced this pull request Oct 21, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #25543

Co-authored-by: JPeer264 <10677263+JPeer264@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants