-
Notifications
You must be signed in to change notification settings - Fork 7
Integrate Sentry monitoring without Remix SDK #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for figuring this out! left some small suggestions but i don't have a ton of knowledge on this so i'll trust your judgement. were you able to get an event to show up in your sentry dashboard?
app/entry.server.tsx
Outdated
Sentry.init({ | ||
dsn: getRequiredGlobalEnvVar("SENTRY_DSN"), | ||
tracesSampleRate: 0.3, | ||
environment: getRequiredGlobalEnvVar("NODE_ENV"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be changed to SENTRY_ENV
? this will allow me to separate staging and production events, which both use NODE_ENV=production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean adding a SENTRY_ENV env var like so?
Sentry.init({
dsn: getRequiredGlobalEnvVar("SENTRY_DSN"),
tracesSampleRate: 0.3,
environment: getRequiredGlobalEnvVar("SENTRY_ENV")
Do we already have SENTRY_ENV setup that differentiates 'staging'/'production'? I'm wondering why can't we just specify 'staging'/'production' in NODE_ENV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tion * origin/main: Improve behavior of getRequiredEnvVarFromObj (#337)
Implemented basic sentry monitoring system by checking 500 responses from the server. While this isn't ideal for tracing (every error will be found at handleRequest(..)), we can still monitor errors through events and breadcrumbs like so:
![Screen Shot 2022-06-26 at 10 08 28 PM](https://user-images.githubusercontent.com/18616121/175847922-a79854d1-3df1-4c7b-a7ae-dff9a127d327.png)
.This is a simple and temporarily implementation as Remix SDK for Sentry is under development: getsentry/sentry-javascript#4894