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(apple): Filter app hang events #9822

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

philipphofmann
Copy link
Member

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.

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs
  • PR was reviewed and approved by a member of the Sentry docs team

Description of changes

Explain how to filter app hang events in beforeSend.

Explain how to filter app hang events in beforeSend.
Copy link

vercel bot commented Apr 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 2:39pm

Copy link

codecov bot commented Apr 26, 2024

Bundle Report

Changes will decrease total bundle size by 12 bytes ⬇️

Bundle name Size Change
sentry-docs-edge-server 427.92kB 3 bytes ⬇️
sentry-docs-server 7.15MB 3 bytes ⬇️
sentry-docs-client 5.76MB 6 bytes ⬇️

Copy link
Member

@kahest kahest left a 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") {
Copy link
Member

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" }) {?

Copy link
Member Author

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>
@philipphofmann philipphofmann enabled auto-merge (squash) April 29, 2024 14:24
@philipphofmann philipphofmann merged commit b2fc92a into master Apr 29, 2024
5 checks passed
@philipphofmann philipphofmann deleted the feat/apple-filter-app-hang-events branch April 29, 2024 14:39
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2024
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.

None yet

3 participants