Skip to content

ref(node): Clarify usage of onFatalError option in node#2643

Merged
kamilogorek merged 3 commits intomasterfrom
node-onfatalerror
Nov 3, 2020
Merged

ref(node): Clarify usage of onFatalError option in node#2643
kamilogorek merged 3 commits intomasterfrom
node-onfatalerror

Conversation

@kamilogorek
Copy link
Copy Markdown
Contributor

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 2, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sentry/sentry-docs/4f8qrqzbe/sentry.dev
✅ Preview: https://sentry-docs-git-node-onfatalerror.sentry.dev

Copy link
Copy Markdown
Contributor

@MimiDumpling MimiDumpling left a comment

Choose a reason for hiding this comment

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

Thanks, Kamil! 🌻


<Alert level="warning" title="Note">

Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to see how it works and recreates in your custom code, see the implementation of [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to see how it works and recreates in your custom code, see the implementation of [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.
Be aware that if you are overwriting this setting, you will lose the default implementation, which handles draining queued events before exiting. If you want to examine how it works and then recreate it in your code, see the implementation of the [`logAndExitProcess`](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/handlers.ts) function.

Co-authored-by: Katie Byers <katie.byers@sentry.io>
@kamilogorek kamilogorek merged commit df25c9c into master Nov 3, 2020
@kamilogorek kamilogorek deleted the node-onfatalerror branch November 3, 2020 09:53
@kamilogorek
Copy link
Copy Markdown
Contributor Author

Applied both suggestions. Thanks! :)

@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation suggestion: warn about using onFatalError Can't prevent Sentry SDK from exiting the process even with onFatalError

3 participants