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

Support for MetricKit reports #767

Open
robmaceachern opened this issue Jul 29, 2020 · 9 comments
Open

Support for MetricKit reports #767

robmaceachern opened this issue Jul 29, 2020 · 9 comments
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature

Comments

@robmaceachern
Copy link

Description

MetricKit exposes a lot of valuable information related to crashes, UI hangs, and things like memory/cpu/network/battery usage. It would be very valuable if Bugsnag coalesced this information into useful statistics for each app release so developers could identify issues or trends over time.

Describe the solution you'd like
I'd like to be able to send the MetricKit payloads to Bugsnag and have aggregate data/visualizations for the metrics for each app release. I'd also like to examine individual MetricKit payloads for individual users.

Describe alternatives you've considered

  • Manually mapping MetricKit data to Bugsnag error reports
  • Ingesting and processing the data on a custom server
  • Finding another service that supports MetricKit

Additional context
Getting access to this data is going to be very important to us when iOS 14 rolls out to end users later this fall.

@abigailbramble
Copy link

Hi @robmaceachern thanks for bringing this up. I can see that you have also raised a support request for this. We'll take a look into how we could leverage MetricKit's features.

@abigailbramble abigailbramble added backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Jul 30, 2020
@robmaceachern
Copy link
Author

Hi @phillipsam. Just checking in on this. Is there anything on the roadmap for better MetricKit support?

@mattdyoung
Copy link

Hi @robmaceachern

It's on our roadmap but we don't have a planned timeframe for this yet.

@sethfri
Copy link

sethfri commented Sep 25, 2020

Hi @mattdyoung, are you folks open to contributions from the community to support this? If so, is there any particular process you would like us to follow other than just submitting a PR?

@mattdyoung
Copy link

Hi @sethfri

Although in general we do consider PRs from the community, in the case of support for MetricKit this would be a reasonably significant product change. We're planning to think carefully about which aspects we build support for and maintain and the best way to align what's possible with other items on our roadmap so I'm afraid we're unlikely to accept an external PR for this.

@sethfri
Copy link

sethfri commented Aug 26, 2021

Hi @mattdyoung, any update on this? It seems that with iOS 15, app hang diagnostics with stack traces can be received immediately (as opposed to only every 24 hours) on-device. Seems like this could be a substantial improvement over the current app hang heuristics.

https://developer.apple.com/documentation/metrickit/mxmetricmanager

@xljones
Copy link

xljones commented Aug 26, 2021

Hey @sethfri, definitely, the updates to MetricKit look promising. We'll take a look into the viability of this :)

For clarity of other readers: Our current App Hang detection reports immediately for handled (recovered) app hangs, and on relaunch of the application for unhandled (app force quit by system watchdog or user) app hangs for iOS versions up to, and including 15.

@ericcj
Copy link

ericcj commented Jan 10, 2023

@phillipsam @mattdyoung @xljones Would love to hear your thoughts about how metric kit should or should not integrate with bugsnag. We currently depend both on:

  1. metrickit-ish data in xcode organizer which catches some crashes inside ios itself bugsnag doesn't appear to (that we still want to work around in our app), and also reports of stack traces driving the most disk writes, energy, hangs and aggregate metrics by version to locate non-crashing regressions in battery/disk/hangs/launch time/memory/scrolling/terminations but still significantly delayed especially the metrics which don't seem to settle for about a month so all new releases look like regressions initially.

  2. bugsnag for real-time data that allows us to catch actual regressions during phased rollout of new versions and also a bit more context like the breadcrumbs.

If it would be possible to gather any of the metric kit data FASTER than xcode organizer it would definitely be worth adding to bugsnag. This sounds like the case from what was just added to sentry via getsentry/sentry-cocoa#2519 "The enableMetricKit option sends MXDiskWriteExceptionDiagnostic, MXCPUExceptionDiagnostic and MXHangDiagnostic to Sentry. The SDK supports this feature from iOS 15 and later and macOS 12 and later because, on these versions, MetricKit delivers diagnostic reports immediately."

The only other solution to upload metrickit events I can find is https://github.com/ChimeHQ/MeterReporter but all it does is upload (symbolicated yay!) json to S3 without aggregation although you can spot-check individual ones with their mac app https://github.com/ChimeHQ/MetricKitViewer

@johnkiely1
Copy link
Member

Hi @ericcj,

We don't have a huge amount to share on this, it is still very much on our backlog but as yet has not been worked on, due to other priorities. At this stage we have not ruled anything in or out as such. Thanks for the additional context of how you use Bugsnag/MetricKit, I'm sure that will prove useful when we do get to work on this. We will post here as soon as we have any updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

7 participants