-
Notifications
You must be signed in to change notification settings - Fork 15
Adds sentry to kaws #75
Conversation
New dependencies added: @sentry/nodeAuthor: Sentry Description: Offical Sentry SDK for Node.js Homepage: https://github.com/getsentry/sentry-javascript/tree/master/packages/node
|
src/index.ts
Outdated
| import { Connection, createConnection } from "typeorm" | ||
| import { databaseConfig } from "./config/database" | ||
| import { createSchema } from "./utils/createSchema" | ||
| const enableSentry = !!SENTRY_PRIVATE_DSN |
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.
what is this !! syntax? new to me
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.
it's the same as Boolean(SENTRY_PRIVATE_DSN) it basically converts a truthy or falsy value to a proper boolean
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.
Boolean(SENTRY_PRIVATE_DSN) might actually be better.
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.
Agreed that seems more communicative.
src/index.ts
Outdated
| // Setup Sentry | ||
| if (enableSentry) { | ||
| Sentry.init({ | ||
| dsn: "https://[email protected]/1405985", |
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.
@xtina-starr we should use the env variable for this correct?
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.
oh shoot I actually set it up that way and forgot to remove this
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.
Good catch @l2succes! This was for the staging environment. I'll go ahead and generate a new key.
eessex
left a comment
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.
Nice that this is so lightweight. Is it correct that we need the vars added to hokusai before merging?
|
@eessex I don't think so especially considering there is a conditional check for the presence of the env variable. I just added the ToDo to remind myself. |
Addresses: GROW-1120
This adds error tracking for the kaws project.
ToDo: