Repository navigation
Report iPad crashes and quiet five iPad log lines - #126
Merged
Merged
Conversation
A MetricKit subscriber logs one line per crash, hang and CPU exception (exception, signal, termination reason, versions, top 8 frames) and one line of exit counts per daily payload. A foreground marker reports a launch that ended on screen, except across an update. The lines go through the support log, so they follow the sharing setting.
An unanswered HELLO is a warning unless that PC answered earlier in the launch. A path that isn't ready is one warning per connection. A USB receive failure is logged once. Foreign-session media and mismatched fragment counts are logged once per session; the stream summary counts the mismatches.
The termination reason is reduced to its namespace and code, an Objective-C exception name is kept only when Apple's pattern names it, and a last pass takes UUIDs and long hex or base64 runs out of the whole line. The exits line adds the four background-only counters.
whoisaldo
marked this pull request as ready for review
October 29, 2026 19:21
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The iPad app sent no crash information, so its crash-free rate couldn't be measured. It now reports crashes through the existing support log and upload. Every line follows the Automatically share diagnostics setting: uploaded while it is on, kept on the iPad while it is off. This PR also quiets five iPad log lines that the field scan found noisy or at the wrong level.
MetricKit (
Core/CrashReporting.swift)CrashReportingis anMXMetricManagerSubscriber, registered inEternalMonitorApp.init. Each report becomes one line:error, categorycrash). The line has:NS…Exceptionor one of a few Apple classes (such asCALayerInvalidGeometry). Any other name isother, and the exception's message is never logged;binary+0xoffset. MetricKit doesn't symbolize, so these offsets resolve with the build's dSYM throughatos;Namespace <NAME>, Code <code>isother.warning,hang): the duration and the attributed thread's top frames.warning,cpu): CPU and sampled time, and the heaviest sampled path, innermost frame first.info,exits): one line per daily metric payload. It counts foreground and background exits: normal, abnormal, memory limit, watchdog, bad access and illegal instruction. The background also has CPU limit, memory pressure, suspended with a locked file, and background task timeout.Example lines:
These lines carry no free text from MetricKit, and no user data:
<id>.Foreground marker
ForegroundMarkeris a small UserDefaults entry:active,connectingornone).willTerminate.If the next launch finds it, the app logs Previous launch ended while EternalMonitor was on screen (possible crash or forced quit) with the stream state, as a
warninginlifecycle. A marker left by another version or build is cleared without a line, so the first launch after an update reports nothing.Log fixes from the field scan
hello_no_replysignal still matches.UDPReceivernow reports a waiting path once per connection and doesn't log it itself.ConnectionManagerlogs UDP path not ready once, as a warning, for both no path and Local Network turned off.FramedLinkno longer logs NWConnection receive, and it logs a failure itself only while no connection has taken the link (a link waiting for its preamble). The connection's state=… USB receive failed line stays.FrameAssembler.mismatchedCountFragmentscounts the rest, and the stream summary line shows the count asmismatched_count_frags=N. A stream restart within the session keeps the count.SupportDiagnosticstakes itsDiagnosticsUploadas an init parameter (default.shared), so a test can check the setting end to end.Tests
New
CrashReportingTests:NSRangeExceptionis kept, and a person's name run together, names with spaces or a newline, and over-long names becomeother;SupportDiagnosticsandDiagnosticsUploadoutbox;start()logs it.Other tests:
ConnectionProblemTestsandNoPictureTimeoutTestscover the HELLO level. The second uses a real loopback PC that first doesn't answer, then answers.UDPReceiverTestschecks that a name that doesn't resolve is reported once per connection.SessionSummaryTestschecks the one warning line.UDPReceiverTestscovers foreign-session media, andFrameAssemblerTestscovers the mismatched-count count.init(_ crash: MXCrashDiagnostic, …)and the others). MetricKit's classes can't be built in a test, and the simulator never delivers payloads. The formatting they feed is covered above.Release notes
The iPad app now reports crashes, hangs and unexpected exits with its diagnostics, if you share them. That lets us find and fix crashes. The reports hold only app and system details, never your files, PC names or what's on your screen. A few connection messages in the support log are also quieter and easier to read.