Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add --sentryDSN flag #1325

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Feat: Add --sentryDSN flag #1325

wants to merge 1 commit into from

Conversation

dennypradipta
Copy link
Contributor

Monika Pull Request (PR)

What feature/issue does this PR add

#1323

How did you implement / how did you fix it

  1. Add Sentry dependencies
  2. Implement captureException logic

How to test

  1. Edit any file, preferrably something that runs immediately like src/commands/monika.ts. Add throw new Error('Testing'
  2. Run `npm run start -- --sentryDSN
  3. It should throw error and exit
  4. Check your Sentry

image
image

Comment on lines +81 to +83
if (flags.sentryDSN) {
initSentry(getContext().flags.sentryDSN as string)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will initialize sentry regardless since flags are not parsed yet.

INIT: Initializing sentry because flags.sentryDSN = "{"description":"DSN for Sentry","input":[],"multiple":false,"type":"option"}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants