-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(apple): Filter app hang events #9822
Conversation
Explain how to filter app hang events in beforeSend.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle ReportChanges will decrease total bundle size by 12 bytes ⬇️
|
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 adding this! just left a question for my own education :)
SentrySDK.start { options in | ||
options.dsn = "___PUBLIC_DSN___" | ||
options.beforeSend = { event in | ||
if (event.exceptions?.first?.type == "App Hanging") { |
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.
l
: is this preferred to checking mechanism , e.g if event.exceptions?.contains(where: { $0.mechanism?.type = "AppHang" }) {
?
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.
Right now yes. We could also consider making isAppHangEvent of the Event.m public https://github.com/getsentry/sentry-cocoa/blob/aa45f3606be62823e6f0fd8f0d6a704b16867e17/Sources/Sentry/SentryEvent.m#L203-L207.
Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
Pre-merge checklist
If you work at Sentry, you're able to merge your own PR without review, but please don't unless there's a good reason.
Description of changes
Explain how to filter app hang events in beforeSend.