-
Notifications
You must be signed in to change notification settings - Fork 70
Description
We currently use Sentry to capture errors on the production deployment but it seems it's not doing a very good job because we're mostly clueless whenever a bug happens to show up. I don't know if it's a configuration issue with Sentry or we're just not doing things correctly to send the logs.
Either way, it's worth to take some time to read the docs to better understand this and try to fix, so we can have more reliable logging for bug fixing. Alternatives to Sentry are also welcome if it's reasonable enough to warrant a migration.
Another thing is that logs from dev environments are also being sent, which leads to some confusion when going over the errors on Sentry. Might have to add a condition to only init Sentry when running on production.
Lines 20 to 22 in d35f563
Sentry.init({ | |
dsn: SENTRY_DSN | |
}) |
So basically, this is what is desired to be improved:
- Disable error reporting outside of production environment
- Fix all the logs that aren't being sent from the production deployment
- Include the serverless function errors logs in the report, or setup a log drain on Vercel
Some useful resources:
- Vercel and Sentry integration https://docs.sentry.io/product/integrations/vercel/
- Sentry guide for Next.js https://docs.sentry.io/platforms/javascript/guides/nextjs/
- Sentry docs https://docs.sentry.io/
- How to store logs on Vercel https://vercel.com/support/articles/how-do-i-store-logs-on-vercel