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

MXCPUException events are incredibly noisy #4109

Open
dfed opened this issue Jun 23, 2024 · 8 comments
Open

MXCPUException events are incredibly noisy #4109

dfed opened this issue Jun 23, 2024 · 8 comments

Comments

@dfed
Copy link

dfed commented Jun 23, 2024

Platform

iOS

Environment

Production, TestFlight

Installed

Swift Package Manager

Version

8.26.0

Xcode Version

15.4

Did it work on previous versions?

No

Steps to Reproduce

Have MXCPUExceptions thrown in your app – I'm not sure what Sentry flags turn this on or off

Expected Result

MXCPUExceptions on a single page or encountered by a single user within a certain small time period get duplicated into the same issue

Actual Result

When a single user enters a state where their app starts throwing MXCPUException, we get half a dozen issues filed at once. I find myself spending a ton of time going through and duplicating/merging issues. I'm at a point where I want to turn off tracking for this kind of error but I'm not sure which dial to turn.

Are you willing to submit a PR?

No response

@brustolin
Copy link
Contributor

Hello @dfed thanks for reaching out.

The MXCPUException Is triggered by MetricKit, we will work to improve grouping.

In the mean time, if you really wants to disable it:

SentrySDK.start { options in
    //...
    options.enableMetricKit = false
}

@kahest kahest moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Jun 26, 2024
@kahest
Copy link
Member

kahest commented Jun 26, 2024

@dfed are you on sentry.io and would you be able to share links to the issues you mentioned? You can link them either here or send them to my email [email protected]

@kahest kahest moved this from Needs Investigation to Needs More Information in Mobile & Cross Platform SDK Jun 26, 2024
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Jun 26, 2024
@dfed
Copy link
Author

dfed commented Jun 28, 2024

I'm not on sentry.io but I'll forward you links shortly. Apologies for the delay!

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 3 Jun 28, 2024
@dfed
Copy link
Author

dfed commented Jun 28, 2024

@kahest here's a list of these kinds of unique events from yesterday, from a single customer, all fired in the same minute:

  1. https://portola.sentry.io/issues/5546165459/events/ffb28f35e3de4f7a89f3c23abb50fdc2/?project=4506735735865344
  2. https://portola.sentry.io/issues/5546165396/events/e1289d4396b5417095ea324c745331fa/?project=4506735735865344
  3. https://portola.sentry.io/issues/5546165641/events/691f4d4c33a24136b7751aef0120ddee/?project=4506735735865344
  4. https://portola.sentry.io/issues/5546165638/events/74643b77db7045d8b86905fef9033dde/?project=4506735735865344
  5. https://portola.sentry.io/issues/5546165615/events/d7afcc0842b446df9aca1b2376328618/?project=4506735735865344
  6. https://portola.sentry.io/issues/5546165649/events/e66b004592a54b808d557a74fb2404f4/?project=4506735735865344
  7. https://portola.sentry.io/issues/5546165747/events/5471993c3b754e23b3c401483cfe6fee/?project=4506735735865344
  8. https://portola.sentry.io/issues/5546165682/events/2f152834fc3e47a392b11d767f0d15c9/?project=4506735735865344
  9. https://portola.sentry.io/issues/5546165717/events/5c598db1da314fd9a17cc9843dd17b51/?project=4506735735865344
  10. https://portola.sentry.io/issues/5546165780/events/7996e462071b4d1e8b078fe699908913/?project=4506735735865344
  11. https://portola.sentry.io/issues/5546165655/events/db43038b01314b209f2ce5442e44b70c/?project=4506735735865344
  12. https://portola.sentry.io/issues/5546165778/events/61022e1c18c8407692168ae1d04150df/?project=4506735735865344
  13. https://portola.sentry.io/issues/5546165887/events/9953b15e43f34880b580e56be9591b81/?project=4506735735865344
  14. https://portola.sentry.io/issues/5546165838/events/aedbb045f4ca48a2a4dd18cc0d24e1da/?project=4506735735865344
  15. https://portola.sentry.io/issues/5546165847/events/0f6a297302ad4f9b945cd967fcef936b/?project=4506735735865344
  16. https://portola.sentry.io/issues/5546165958/events/5ca4eebdd5c9453bb51660c6b1e62643/?project=4506735735865344
  17. https://portola.sentry.io/issues/5546165814/events/e6d5d3bf42af426b91545782a648fc6d/?project=4506735735865344
  18. https://portola.sentry.io/issues/5546166011/events/46de21a846264eab974b7ef39bc628b8/?project=4506735735865344
  19. https://portola.sentry.io/issues/5546165882/events/3c31eca726ad4edcad89705ab3cca262/?project=4506735735865344

This kind of barrage of nearly 20 issues at once for the same underlying cause is typical. Every time a customer of ours ends up in MX*Exception land we get another barrage of unique issues. If you search our project for PortolaApp.$main, you'll find more than 160 of these, and any issue created in the same minute as these is almost certainly a duplicate.

Let me know if I can provide more info!

@kahest kahest moved this from Needs More Information to Needs Discussion in Mobile & Cross Platform SDK Jul 1, 2024
@kahest kahest moved this from Needs Discussion to Needs Investigation in Mobile & Cross Platform SDK Jul 1, 2024
@kahest
Copy link
Member

kahest commented Jul 1, 2024

@dfed Thanks a lot, this is definitely helpful. We'll need to investigate and follow up here. Please be aware that due to conferences and PTOs we're currently a bit slower than usual.

@philipphofmann
Copy link
Member

@dfed, the quality of the stacktraces depends on MetricKit. The Cococ SDK takes them and parses them to Sentry events. The problem I see is that most of your MXCPUException events have the same title as Sentry uses the inApp frames to determine the title. Still, issue seems to have a different stacktrace for the root cause. Can you post some examples of issues you merged?
I guess if we improved grouping, they would be more actionable. Do you have any suggestions on how you would expect the issues to be grouped?

@dfed
Copy link
Author

dfed commented Aug 15, 2024

Apologies for the delay responding! I don't know which issues I've merged at this point.

I just know that without any event grouping the issues filed couldn't be prioritized, and the volume of issues created any time a user entered this exception state meant these alerts were effectively noise.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Aug 15, 2024
@philipphofmann
Copy link
Member

@dfed, I checked your events again, and I see some top most frames in a package called GameController, that could potentially be inApp, but they aren't. So should these frames be inApp? If yes, maybe you need to add GameController to inAppIncludes or you could change the stacktrace rules in your project, so we mark them as inApp, because then Sentry considers them for grouping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Investigation
Development

No branches or pull requests

4 participants