blues-stack icon indicating copy to clipboard operation
blues-stack copied to clipboard

feat: adds sentry monitoring

Open scefali opened this issue 2 years ago • 3 comments

This PR adds Sentry monitoring to the blues stack using the new @sentry/remix SDK. Sentry is an application monitoring tool that helps developers with finding bugs and performance issues. By including Sentry out of the box, users will have one less thing to worry about when deploying their code to production.

Right now this is just a draft PR to get feedback on this approach of adding Sentry.

  • [ ] Finalize monitoring code changes
  • [ ] Update build instructions for source map generation
  • [ ] Update Readme for Sentry
  • [ ] Add Sentry logo to home page

scefali avatar Sep 21 '22 19:09 scefali

I'll leave this up to the team, but I think this would be better as an example instead of including it with our stacks out of the box tbh.

I agree, an example or a forked stack would be a better place for it :)

mcansh avatar Sep 28 '22 16:09 mcansh

@mcansh Is it possible to talk to you all about this further? Like other product choices made in Blues Stack (e.g. Prisma, Cypress, Docker), Sentry is open source/source available software (BSL + Apache 2.0) with an optional commercial cloud offering (sentry.io). The DSN configuration in the above PR allows you to specify either a self-hosted Sentry instance or point to a project hosted on sentry.io.

We feel this is change is meaningful to Remix users because:

  1. Sentry is currently the only monitoring solution that has supports Remix as a first-class platform (AFAICT, please correct me otherwise).
  2. Sentry is the most widely used production error monitoring solution for JavaScript projects. Our JavaScript SDK (@sentry/browser) is downloaded from npm over 3 million times a day, about as frequently as Cypress.
  3. Even if users do not self-host Sentry, Sentry.io offers a free tier that is perfectly useful for hobbyists (similar to Fly.io).
  4. Remix highlights its error handling capabilities, but does not provide guidance on how to log those errors anywhere. We feel error monitoring has become a critical part of the error handling story and it's worth having a documented/highlighted solution here.

I'd love to find out a way how we could be included here, for example, what if we deferred/omitted instrumentation unless a SENTRY_ENV environment variable is set, present, and valid?

benvinegar avatar Oct 03 '22 15:10 benvinegar

Reopening for discussion.

machour avatar Oct 03 '22 23:10 machour

@machour Any updates? I can work on completing this PR if folks agree with Ben about adding Sentry.

scefali avatar Oct 18 '22 12:10 scefali

No discussion has happened as far as I see 😅 Let's see if @mcansh want to chime in and take a decision here

machour avatar Oct 18 '22 12:10 machour

@machour Any updates? I can work on completing this PR if folks agree with Ben about adding Sentry.

I plan to add Sentry to my app also. Could you still complete this PR when having time? It could be a great example of how we could setup Sentry with Remix

HuyAms avatar Nov 18 '22 10:11 HuyAms

Closing from lack of interest

scefali avatar Jan 05 '23 19:01 scefali