Open lforst opened 1 year ago
Is there no way to get stack traces in edge functions currently? This is what ours look like:
No, unfortunately not. However, it is on our very-short-term roadmap. I might even start working on it today!
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!
Issue on the vercel repo for context: https://github.com/vercel/vercel/issues/10829
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:
Vercel:
@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: https://github.com/vercel/vercel/issues/10829
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.