Skip to content

fix(v8/bun): Ensure instrumentation of Bun.serve survives a server reload #15157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

AbhiPrasad
Copy link
Member

Backport of #15148

…oad (#15148)

If `#reload` is called on an instance of `Bun.serve`, the Sentry
intrumentation doesn't surive. This is because the Bun instrumentation
works by using `Proxy` on the call to `Bun.serve`, which isn't called
for a reload.

We can't wrap the serve created by calling `Bun.serve` with a `Proxy` as
Bun seems to do some internal checks using `instanceof` which break if
the instance is now reporting itself as a `ProxyObject`.
@AbhiPrasad AbhiPrasad requested a review from a team January 24, 2025 18:12
@AbhiPrasad AbhiPrasad self-assigned this Jan 24, 2025
@AbhiPrasad AbhiPrasad requested review from mydea and s1gr1d and removed request for a team January 24, 2025 18:12
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

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

🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants