Skip to content

Cl3arglass/vercel-sentry-demo

 
 

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Bug demo

You'll need to set up demo sentry project.

Make sure to add Sentry DSN to your env:

export NEXT_PUBLIC_SENTRY_DSN=xyz
export SENTRY_AUTH_TOKEN=
export SENTRY_ORG=
export SENTRY_PROJECT=
  1. Running dev server locally should trigger sentry errors for both server and client:
yarn dev

Once dev server starts click "Demo page link" on the homepage.

  • For server side error - refresh the demo page until you the error - it will trigger server side error in 50% of cases.
  • For client side error - click the button on the demo page which will trigger it.

Observe sentry errors in Sentry dashboard. Both server side and client side errors should appear.

  1. Building production version and running it locally should also trigger same errors:
yarn build && yarn start

Repeat same steps for triggering errors.

Observe sentry errors in Sentry dashboard. Both server side and client side errors should appear.

  1. Deploy this repo to vercel, you'll need to add following ENV variables:
NEXT_PUBLIC_SENTRY_DSN=xyz
SENTRY_AUTH_TOKEN=
SENTRY_ORG=
SENTRY_PROJECT=

Trigger same set of errors, observe that only client side errors are reported in this case.

About

Demo repo for vercel-sentry bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.7%
  • CSS 20.0%
  • Shell 5.3%