Never sure what method to use for caught exceptions or informational type messages? #3465
Closed
ColtonIdle
started this conversation in
General
Replies: 2 comments
For custom or handled exceptions, works the same way as our automatic uncaught exception handler pretty much, but you capture it manually in this case.
For plain string informational messages or logs, e.g. if you want to get alerted on some kinds of logs, etc.
For full-fledged event with everything under your control. All the values you set will be considered and not overridden by the global values (e.g. tags, breadcrumbs, contexts, etc.). Requires more boilerplate from your side. Essentially |
0 replies
|
Amazing. Thank you so much
Sent from Proton Mail Android
…-------- Original Message --------
On 6/7/24 11:20 AM, Roman Zavarnitsyn wrote:
> Sentry.captureException
For custom or handled exceptions, works the same way as our automatic uncaught exception handler pretty much, but you capture it manually in this case.
> Sentry.captureMessage
For plain string informational messages or logs, e.g. if you want to get alerted on some kinds of logs, etc.
> Sentry.captureEvent
For full-fledged event with everything under your control. All the values you set will be considered and not overridden by the global values (e.g. tags, breadcrumbs, contexts, etc.). Requires more boilerplate from your side.
Essentially captureMessage and captureException are just shortcuts for captureEvent provided to your convenience. Does that make sense?
—
Reply to this email directly, [view it on GitHub](#3465 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AHSHXZIZP35SIDCP3UHEAELZGHFVTAVCNFSM6AAAAABI6XVMKWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TOMBTHE4DQ).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Still sorta new to sentry.
I see
Sentry.captureException
Sentry.captureMessage
Sentry.captureEvent
I know don't understand when to use each, when. can anyone help disambiguate? thank you!
All reactions