Skip to content

Automatically detect Vercel Edge Runtime and disable SDK accordingly #6346

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

Closed
lforst opened this issue Nov 30, 2022 · 4 comments
Closed

Automatically detect Vercel Edge Runtime and disable SDK accordingly #6346

lforst opened this issue Nov 30, 2022 · 4 comments
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement

Comments

@lforst
Copy link
Member

lforst commented Nov 30, 2022

Problem Statement

The Next.js SDK crashes when run on the Vercel Edge Runtime. We have the means to check whether the SDK runs inside that runtime, so we can simply disable the SDK if that is the case.

Solution Brainstorm

As suggested by members of Vercel we could do a check like typeof EdgeRuntime !== "string" and just don't init.

@AbhiPrasad
Copy link
Member

Duplicate of #5974?

@lforst
Copy link
Member Author

lforst commented Nov 30, 2022

Duplicate of #5974?

Eh, more or less but not really.

@smeubank smeubank added the Package: nextjs Issues related to the Sentry Nextjs SDK label Dec 5, 2022
@heldr
Copy link

heldr commented Dec 5, 2022

Yes, I keep getting issues like that on Edge Runtime

CleanShot 2022-12-05 at 14 16 01@2x

@lforst
Copy link
Member Author

lforst commented Dec 5, 2022

@heldr Until we release the automatic fix for this use can use the excludeServerRoutes option to exclude vercel edge runtime routes from being instrumented with Sentry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Improvement
Projects
None yet
Development

No branches or pull requests

4 participants