-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add a metrics kit logger #89
Conversation
Generated by 🚫 Danger Swift against 95c9596 |
} | ||
|
||
NSSetUncaughtExceptionHandler { exception in | ||
MetricsMonitor.logExceptionUsingCallStackSymbols(exception, description: "Uncaught Exception") |
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.
Do I understand it correctly we now log crashes the old way and new way through metric kit? Because metric kit is only delivering reports once every 24 hours.
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.
Yes! MetricKit only delivers once per 24 hours, so you're not sure whether a crash is reported. Though, MetricKit reports much more than this exception handler. For example, EXC_BAD_ACCESS
crashes don't get catched with this handler as there's no exception thrown.
Therefore, a combination of both is most useful
extension MetricsMonitor: MXMetricManagerSubscriber { | ||
@available(iOS 13.0, *) | ||
func didReceive(_ payloads: [MXMetricPayload]) { | ||
// We don't do anything with metrics yet. |
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.
Should we open an issue for this? There might be some valuable information we could log as well.
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.
I checked whether there was something obvious valuable, but there wasn't. Crashes really is the one thing we need now I think. Battery draining information and stuff won't really help in support issues.
Let me know if you disagree!
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.
Yeah I agree. The only one that comes to mind is background termination reason and memory termination.
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.
Nice! I have just two questions.
Congratulations! 🎉 This was released as part of Release 1.10.0 🚀 Generated by GitBuddy |
For now, we're only logging crashes as the other diagnostics aren't easy to read and won't add as much value as the crashes payload does.
Fixes #86
Fixes #73