Skip to content
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

Vercel Edge Runtime Stack Traces #6805

Open
Tracked by #9621
lforst opened this issue Jan 16, 2023 · 6 comments
Open
Tracked by #9621

Vercel Edge Runtime Stack Traces #6805

lforst opened this issue Jan 16, 2023 · 6 comments
Assignees
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Package: vercel-edge Issues related to the Sentry Vercel Edge SDK Type: Improvement

Comments

@lforst
Copy link
Member

lforst commented Jan 16, 2023

Problem Statement

The stack traces on the Vercel Edge runtime still look horrible. They seem to flow through some kind of sandbox and aren't source mapped at all.

Solution Brainstorm

We should first try to source map the events somehow by uploading the right files. If we don't come to a solution we can collaborate with the Vercel folks.

@vojto
Copy link

vojto commented Nov 6, 2023

Is there no way to get stack traces in edge functions currently? This is what ours look like:

Screenshot 2023-11-06 at 11 06 52

@lforst
Copy link
Member Author

lforst commented Nov 6, 2023

No, unfortunately not. However, it is on our very-short-term roadmap. I might even start working on it today!

@lforst lforst self-assigned this Nov 6, 2023
@lforst
Copy link
Member Author

lforst commented Nov 6, 2023

Ok, good news and bad news.

I just chatted with some people from Vercel and they said they bundle the edge functions an additional time when deploying. This means the SDK doesn't have the opportunity to upload the newly (Vercel) bundled files + sourcemaps to Sentry.

We'll brainstorm a solution for this!

@lforst lforst changed the title Next.js Edge Runtime Stack Traces Vercel Edge Runtime Stack Traces Nov 6, 2023
@lforst
Copy link
Member Author

lforst commented Nov 14, 2023

Issue on the vercel repo for context: vercel/vercel#10829

@jenwoodson
Copy link

Hey, @lforst, I want to double-check this is what I'm running into, and then I'll go comment on the Vercel issue. When I send edge runtime errors from my local environment, I at least get the correct file names in my stacktrace. But, the same error sent from a Vercel environment just has vc/edge/function and <anonymous>. This sounds like your good news (I can get the filenames locally) and your bad news (I can't get the filenames from Vercel), right?

local:
Screen Shot 2023-12-19 at 11 25 17 AM

Vercel:
Screen Shot 2023-12-19 at 11 25 57 AM

@lforst
Copy link
Member Author

lforst commented Dec 20, 2023

@jenwoodson Yes you are running into the same issue. Stack traces and source maps on Vercel are inherently broken for tools like Sentry and to fix this, Vercel would need to provide a way to access the source maps they generate after they run their additional (hidden) bundling step.

You can follow this issue for progress: vercel/vercel#10829

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 Package: vercel-edge Issues related to the Sentry Vercel Edge SDK Type: Improvement
Projects
Status: No status
Development

No branches or pull requests

5 participants