Environments for issues when using Vercel Integration unclear #14706
Unanswered
thomas-worcay
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a question regarding the values for "environment" when using Sentry with NextJS on Vercel and two questions why the logging differs based on the environment.
I created a minimal working example to showcase my problem in this repositiry.
Let me quickly break down my setup:
I'm using Sentry version 8.42 and the latest version of NextJS 14. My app is deployed on Vercel and I'm using the Sentry Vercel Integration. I have three branches: main, testing and dev. The coding for each branch only differs in the exception message that the button and API route are throwing.
My first question: When I run my app locally via
npm run dev
and press the button to trigger an error, it creates two issues on the Sentry dashboard. The "Sentry Example Frontend Error - DEV" issue has its environment set to "vercel-development" and the "Sentry Example API Route Error - DEV" has its environment set to just "development".Can someone please explain why the environment differs for the two issues?
Before deploying to Vercel and adding the Vercel Integration, it would say "development" in both cases. So why did it change for the frontend error now?
My second question: Why does the API error when I trigger it on my Vercel Production deployment not show the source code that triggered the error? This is what I see in the Sentry dashboard for my "vercel-production" and for my "development" environment:
My third question: Why is the above mentioned API error not logged at all when I trigger it on my Vercel Preview deployment? When I press the button on the deployment created by my testing branch, I'm only getting an issue for "Sentry Example Frontend Error - TESTING".
Thanks a lot for your time and help 🙏🏻
Thomas
Beta Was this translation helpful? Give feedback.
All reactions