How to use Meter to catch crash infomations?
I integrated this library to my project, but now I have no idea about how to use Meter. Is there have any documents about how to using Meter? Thank you.
There defnitely should be more.
Can I ask why you opted for Meter specifically over using MetricKit directly? What were you looking for? MetricKit-captured crashes are already presented in the Xcode crash viewer.
Actually, my leader suggest this library to me and ask me to investigate how to integrate this library to our project. I just want to catch crash informations and then write those infos into out log system.
Have you already integrated MetricKit into your app? Here's how you do that:
https://developer.apple.com/documentation/metrickit/mxmetricmanager
And here's a library that uses Meter to do, among other things, symbolication. I guess that's what you want from Meter over raw MetricKit data.
https://github.com/ChimeHQ/MeterReporter/blob/main/Sources/MeterReporter/MeterReporter.swift
I'll also work on a more minimal example for this project's readme. Definitely needs to there. And please don't be shy with questions!
@mattmassicotte
I want to track crashes occurring in my third-party library and report only those crashes to our backend.
Since our framework is vendored, we can't use other crash reporting tools as they may interfere with the host app.
We initially found MetricKit to be a good fit, but the crash reports it provides are difficult to interpret. Eventually, we came across Meter.
I would like to know if Meter can help libraries filter out only the crashes happening within their own code and upload them to our backend, rather than relying on the host app to report crashes related to our SDK.
Meter can help work with MetricKit in general, but here's a stack overflow answer I gave on the general problem. It's actually extremely tricky!
https://stackoverflow.com/questions/50867813/crash-analyzing-tool-in-framework/51294888#51294888
Can I use Meter along with MetricKit to filter the MetricKit payload and send only crashes related to my library to our backend? @mattmassicotte
You can use Meter to inspect reports. In many cases you’ll be able to examine the symbolic information of frames too. If that is enough for you to do the filtering you want, then yes!
Understood thank you so much for this information. @mattmassicotte
After a few attempts, we realized that filtering based on symbolic information is proving to be challenging. Is there any way for a third party to track the performance and metrics of a library to provide insights like crash-free percentage and other key metrics?
@mattmassicotte
Hello @mnive93 ! Did you read the comment I linked from Stack Overflow? Basically, want you want to do is very challenging. You might be able to get a small amount of actionable information, but because your SDK is a guest within a hosting application, it just isn't really possible to isolate your SDK from everything else.