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

feat: add Sentry

Open scefali opened this issue 1 year ago • 2 comments

This PR adds Sentry to the Epic Stack. I am largely just following the guide Sentry has for Remix: https://docs.sentry.io/platforms/javascript/guides/remix/

This will add Sentry's error, performance, and session replay monitoring automatically assuming the user sets a SENTRY_DSN in their environment.

Note that source maps are currently not working which is a blocker to get this merged.

scefali avatar May 15 '23 19:05 scefali

@scefali I've roughly checked this PR and have yet to get myself familiar with 'epic-stack'. Do you mind sharing why the source maps still aren't working?

priscilawebdev avatar May 16 '23 18:05 priscilawebdev

@scefali I've roughly checked this PR and have yet to get myself familiar with 'epic-stack'. Do you mind sharing why the source maps still aren't working?

@priscilawebdev I need to add the step to upload source maps, working on that now. Trying to figure out the right way of handling all the env variables though.

scefali avatar May 16 '23 18:05 scefali

Sorry it took me so long to get around to updating the docs, but they're up-to-date now so if you could follow the same sort of thing we do for mailgun that would be stellar 👍 The doc name should be "error-reporting.md" not "sentry.md"

Thanks again!

kentcdodds avatar May 30 '23 20:05 kentcdodds

@kentcdodds No worries...I'm still trying to figure out the best way of getting source maps set up. Not the easiest thing! Might take me a few weeks to get everything ready since I'm doing this on the side of my actual work lol.

EDIT: There's a bug that's preventing this from working properly that we need to fix first: https://github.com/getsentry/sentry-javascript/issues/8265

scefali avatar May 31 '23 16:05 scefali

This all looks great to me! Just a few things. Also, could we get a docs page?

@kentcdodds Yea, I'll get to this once the underlying bug in the SDK is fixed. Unfortunately, that blocks getting this merged, right now it's not even functional because of this bug https://github.com/getsentry/sentry-javascript/issues/8265

EDIT: Already fixed! Wow that was fast, I'll need to fix this when I have time

scefali avatar Jun 02 '23 16:06 scefali

Sounds great! Thank you 👏

kentcdodds avatar Jun 02 '23 17:06 kentcdodds

@kentcdodds Ok I think this is finally ready to go! Not a perfect implementation (couldn't get the Sentry-Prisma integration working) but at the very least it's a good starting place I think.

scefali avatar Jun 06 '23 20:06 scefali

With Remix v1.17.0 there's now a handleError function in entry.server that can work for error reporting.

sergiodxa avatar Jun 06 '23 20:06 sergiodxa

Main is now on the latest Remix as well :)

kentcdodds avatar Jun 07 '23 22:06 kentcdodds

How would this change if I wanted to try the prisma integration myself?

@kentcdodds Do you want me to put a comment on how to use it assuming it works correctly?

scefali avatar Jun 08 '23 21:06 scefali

@kentcdodds Done, just added a comment about the project name.

scefali avatar Jun 09 '23 15:06 scefali