MetricKit

RSS for tag

Aggregate and analyze per-device reports on power and performance metrics using MetricKit.

Posts under MetricKit tag

84 Posts

Post

Replies

Boosts

Views

Activity

How to get specific metric object from MetricKit using measure(metrics: metrics) results on XCUITest?
let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time XCTCPUMetric(), // to measure cpu cycles XCTStorageMetric(), // to measure storage consuming XCTMemoryMetric(), ] let measureOptions = XCTMeasureOptions.default measureOptions.iterationCount = 1 measure(metrics: metrics) { //App flow } I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it. Example - // let cpuMetric = CPU measure object should be here & I can get each information from this object. // let MemoryMetric = Memory measure object should be here & I can get each information from this object. But It's not available in XCUITest. We can only able to find it in the TestResult file. Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
0
0
653
Aug ’24
How specific metric object from measure(metrics: metrics) results on XCUITest using MetrixKit?
` let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time XCTCPUMetric(), // to measure cpu cycles XCTStorageMetric(), // to measure storage consuming XCTMemoryMetric(), ] let measureOptions = XCTMeasureOptions.default measureOptions.iterationCount = 1 measure(metrics: metrics) { //App flow } ` I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it. Example - // let cpuMetric = CPU measure object should be here & I can get each information from this object. // let MemoryMetric = Memory measure object should be here & I can get each information from this object. But It's not available in XCUITest. We can only able t find it in the TestResult file. Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
0
0
597
Aug ’24
Insufficient Metrics Data
No metrics data found for the latest app versions with sufficient usage. What is sufficient usage ? Can we define sufficient usage ourself ? if Yes then how ? https://developer.apple.com/videos/play/wwdc2020/10076/ wwwdc200 does mention factor of 5, but 5 of what ? and when where is the definition ? Organizer -> Metrics is useless if there is no data. If someone knows the fix please suggest.
2
0
1.1k
Jun ’24
Are the Hangs Collected by MetricKit All Longer Than One Second?
I have integrated MetricKit into my production app and listening for the corresponding callback func didReceive(_ payloads: [MXDiagnosticPayload]) After some time, I've noticed that the hang diagnostics data collected are all for hangs longer than 1 second. Does MetricKit only collect hang data for hangs longer than 1 second? Can this threshold be adjusted, for example, to 500ms? Is there any sampling involved in the collection of hang diagnostics? The number of hang events collected by MetricKit is significantly lower compared to other third-party platforms. Thank you for your response, this is very important to me.
1
2
785
May ’24
In statistical objects In MXMetricPayload histogrammedTimeToFirstDrawKey start times not equal applicationExitMetrics exit
In statistical objects In MXMetricPayload histogrammedTimeToFirstDrawKey start times not equal applicationExitMetrics exit: case1: "applicationExitMetrics": { "backgroundExitData": { "cumulativeNormalAppExitCount": 3, "cumulativeMemoryPressureExitCount": 4 }, "foregroundExitData": { "cumulativeMemoryResourceLimitExitCount": 3 } }, "applicationLaunchMetrics": { "histogrammedTimeToFirstDrawKey": { "histogramNumBuckets": 14, "histogramValue": { "10": { "bucketCount": 1, "bucketStart": "1740 ms", "bucketEnd": "1749 ms" }, "2": { "bucketCount": 1, "bucketStart": "1440 ms", "bucketEnd": "1449 ms" }, "3": { "bucketCount": 2, "bucketStart": "1490 ms", "bucketEnd": "1499 ms" }, "11": { "bucketCount": 1, "bucketStart": "1780 ms", "bucketEnd": "1789 ms" }, "4": { "bucketCount": 1, "bucketStart": "1500 ms", "bucketEnd": "1509 ms" }, "5": { "bucketCount": 1, "bucketStart": "1580 ms", "bucketEnd": "1589 ms" }, "12": { "bucketCount": 1, "bucketStart": "1860 ms", "bucketEnd": "1869 ms" }, "6": { "bucketCount": 1, "bucketStart": "1620 ms", "bucketEnd": "1629 ms" }, "13": { "bucketCount": 1, "bucketStart": "1990 ms", "bucketEnd": "1999 ms" }, "7": { "bucketCount": 1, "bucketStart": "1650 ms", "bucketEnd": "1659 ms" }, "0": { "bucketCount": 1, "bucketStart": "1400 ms", "bucketEnd": "1409 ms" }, "8": { "bucketCount": 1, "bucketStart": "1660 ms", "bucketEnd": "1669 ms" }, "1": { "bucketCount": 1, "bucketStart": "1430 ms", "bucketEnd": "1439 ms" }, "9": { "bucketCount": 1, "bucketStart": "1730 ms", "bucketEnd": "1739 ms" } } }, In this Case the app cold started 15 times, but quit only 10 times, why?? case2: "applicationExitMetrics": { "backgroundExitData": { "cumulativeMemoryPressureExitCount": 1 }, "foregroundExitData": { "cumulativeMemoryResourceLimitExitCount": 3, "cumulativeNormalAppExitCount": 1 } }, "applicationLaunchMetrics": { "histogrammedTimeToFirstDrawKey": { "histogramNumBuckets": 3, "histogramValue": { "0": { "bucketCount": 1, "bucketStart": "1490 ms", "bucketEnd": "1499 ms" }, "1": { "bucketCount": 1, "bucketStart": "1680 ms", "bucketEnd": "1689 ms" }, "2": { "bucketCount": 1, "bucketStart": "1880 ms", "bucketEnd": "1889 ms" } } }, The app cold started 3 times, but quit unexpectedly reached 5 times, why???
1
1
827
Apr ’24
Decoding crash report IPS metadata JSON keys
I've recently started working with IPS files, specifically crash reports. According to the documentation there are a number of metadata keys included in these payloads, however, I have found a number that are present in real ips files from device but are not documented. Does anyone know what version of iOS these 'new' metadata keys were introduced? How about if they're expected or if I should treat them as optional. https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report#IPS-metadata { "app_name":"ApplicationNameHere", "timestamp":"2024-02-15 08:05:05.00 -0600", "app_version":"1.6.0", "slice_uuid":"6b1f9f4e-3025-364f-9847-914fc1fe14d1", "build_version":"800", "platform":2, "bundleID":"reverse.domainname.bundleidentifier", "share_with_app_devs":1, "is_first_party":0, "bug_type":"309", "os_version":"iPhone OS 17.3.1 (21D61)", "roots_installed":0, "name":"ApplicationNameHere", "incident_id":"1CF0B8A1-EB43-46B3-AA9F-CFA8A9259190" } The following keys are not in the documentation: app_name, os_version, slice_uuid, share_with_app_devs, is_first_party, roots_installed I created this feedback to request the documentation be updated with current state. FB13631161 - Developer Documentation: Update IPS metadata to reflect latest values found in IPS Metadata JSON
1
0
3.6k
Feb ’24
Metrickit opt in rate and actual crash numbers dont match
The crash data opt in rate is 36% for my app. I have another crash reporting framework PLC in the app. The total number of crashes reported by MetricKit health report was 43% of the total crash count from PLC in May. This almost matched the 36% opt in rate. In the month of June we fixed a series of crashes. Now the total number of crashes reported by MetricKit health report is 80% of the total crash count from PLC. The crash data opt in rate has stayed at 36% for the past 90 days and I am not able to understand how the ratio flipped from 43% to 80%. Looking for guidance here.
5
0
2.2k
Feb ’24
HUD guide
Hello, I am looking for a guide on what the HUD graph axis' are, with my main curiosity around the GPU metering. Is this number the load average of the cores, similar to the load avg you see in uptime/top or is it another descriptor? I've not been able to refer to a man page or the readme for this, google searches have yielded me many ways to disable the HUD, but no guide
2
0
1k
Feb ’24
MetricKit MXCallStackTree symbolication
I am trying to implement MetricKit so later I could analyze MXCrashDiagnostic and MXHangDiagnostic reports. However when I am triggering a test crash, Here is an example of what I get for MXCrashDiagnostic: iente "timeStampEnd": "2021-06-07 15:59:00 +0000", "crashDiagnostics": [ { "version": "1.0.0", "callStackTree": { "callStacks": [ { "threadAttributed": true, "callStackRootFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "35463E49-9534-3644-B993-2A73C287A143", "offsetIntoBinaryTextSegment": 4329963520, "sampleCount": 1, "binaryName": "demo", "address": 4333717704 }] I tried to symbolicate the the data, by executing commands: atos -arch arm64e -o /Users/xxx/Downloads/!dsym-4/demo.app.dSYM/Contents/Resources/DWARF/demo 4333717704 But I can't find the crash stack and the result returned is 4333717704 the DSYM file uuid is UUID: 35463E49-9534-3644-B993-2A73C287A143 (arm64) /Users/xxx/Downloads/!dsym-3/demo.app.dSYM/Contents/Resources/DWARF/demo How should the stack returned by MetrickIt be symbolized? Who can tell me very grateful
3
1
3.3k
Dec ’23
WatchDog failed to terminate gracefully after 5.0s
{signal=SIGKILL, exceptionCode=0x00000000, virtualMemoryRegionInfo=unkown, terminationReason=<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<com.***.***>:3682] failed to terminate gracefully after 5.0s ProcessVisibility: Background ProcessState: Running WatchdogEvent: process-exit WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 12.680 (user 7.120, system 5.560), 41% CPU", "Elapsed application CPU time (seconds): 1.309, 4% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive>} i have no idea about this crash. who can explain this for me? what cause this problem? when does this problem occur?
1
0
2.4k
Oct ’23
MetricKit and when or when not do we get reports?
The MetricKit implementation is pretty straight forward. I am testing it now for a couple of days, but I never saw any report passed to my test apps. (implemented it in an empty app that just crashes every now and then and in a product of ours) The function 'didReceive' is never called and each time I am asking 'MXMetricManager.shared.pastDiagnosticPayloads' I get an empty collection. So that is the secret here? Is MetricKit not working for development builds? Or are there other factors/requirements not meet? import Foundation import MetricKit class CrashDetection: NSObject, MXMetricManagerSubscriber { @objc static let shared = CrashDetection() @objc private override init() { } internal static var crashDidOccur: Bool { get { UserDefaults.standard.bool(forKey: crashDidOccurKey) ?? false } set { UserDefaults.standard.set(newValue, forKey: crashDidOccurKey) } } @objc func start() { MXMetricManager.shared.add(self) } @objc func stop() { MXMetricManager.shared.remove(self) } func didReceive(_ payloads: [MXDiagnosticPayload]) { let crashDiagnostics = payloads.compactMap({ $0.crashDiagnostics }) CrashDetection.crashDidOccur = crashDiagnostics.isEmpty == false } }
1
0
1.8k
Sep ’23
Requesting additional information with MXAppExitMetric payload.
Hi all, my company is looking more into MetricKit's MXAppExitMetric. The existing breakdown of exit reasons is very helpful but we are hoping to find a way to link these exits with a timestamp. This would help us to correlate app exits with other events that we are tracking on our side. Are there plans currently plans to add more granularity to this payload? If not, how can I submit an official request to do so?
3
0
1.2k
Sep ’23
Empty callStackRootFrames on MXCrashDiagnostic
Hi folks! My iOS app has the MetricKit integration, and I'm processing the reports on my server. While looking at some MXCrashDiagnostic reports, I saw certain reports that has threadAttributed property as true, but callStackRootFrames is just an empty array. So the report looks like the following example "callStacks" : [ { "threadAttributed" : true, "callStackRootFrames" : [ ] }, // ... // other callstacks where threadAttributed is false // but callStackRootFrames is not empty ] Looking at the documentation I can see threadAttributed is used to determine if the crash/exception occurred in this crash. So I can't understand how callStackRootFrames can be empty when threadAttributed is true. Is this a bug or an expected behavior? Also, is there a case where the crash/exception report does not have any callstack with threadAttributed as true? From the definition, it feels like there should always be exactly one attributed thread on each crash report. Thanks for the help!
1
0
1.1k
Sep ’23
Can't get a cumulativeHitchTimeRatio metric from MetricKit
Hello guys! I'm trying to collect metrics for each UIViewController in my iOS app. I can see all aggregated metrics except the cumulativeHitchTimeRatio one. I created a sample project and run UI test for more than 2 hours to allow Apple MetricKit to collect the metrics. When I run measure UI test it collects needed data well (look attached screenshots), but, unfortunately, I receive empty signpostMetrics array next day (json attached) in the didReceive(_:) method. Could you help me to understand how to get the cumulativeHitchTimeRatio metric from the MetricKit framework?
3
0
1.9k
Jul ’23
Not receiving Metric Kit payload
Hello all, I wanted to get MXMetricPayload to analyse some App metrics. And for some reason the method func didReceive(_ payloads: [MXMetricPayload]) from mxMetricManager is not being executed. For this I created a Class: import MetricKit public final class MetricKitManagerImpl: NSObject, MetricKitManager { public static let shared: MetricKitManager = MetricKitManagerImpl(mxMetricManager: MXMetricManager.shared) private let mxMetricManager: MXMetricManager private init( mxMetricManager: MXMetricManager ) { self.mxMetricManager = mxMetricManager super.init() mxMetricManager.add(self) } deinit { mxMetricManager.remove(self) } public func didReceive(_ payloads: [MXMetricPayload]) { payloads.forEach { if let scrollHitchTimeRatio = $0.animationMetrics?.scrollHitchTimeRatio.value { sendToSomeWhere(scrollHitchTimeRatio) } } } } Then on the AppDelegate on didFinishLaunchingWithOptions I do: private(set) var metricsManager: MetricKitManager! func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool { self.metricsManager = MetricKitManagerImpl.shared ... } With this setUp I am able to receive the debug playload (triggered from Xcode Menu. Debug -> Simulate Metrik Kit Payload). However, after using the app for some days, I did not receive any real payload. Did anyone experience this? What am I doing wrong? Thanks a lot in advance! Miguel Franco
1
0
1.4k
Jun ’23
MetricKit doesn't work for system Launch Daemons/Agents
This is related to my post https://developer.apple.com/forums/thread/724698 where I submitted an issue that MetricKit reports didn't work for System Extensions on mac. I've come to realize that this is also true for Launch Daemons/Agents in the system domain (and so it probably also explains the System Extension case as I understand System Extensions are somewhat like Launch Daemons). I have a "thin executable" (a Command Line Tool target) that registers with MetricKit reports and then just crashes itself. Here's the scenarios I've tested - If I launch this executable as the current user, I receive the crash reports from MetricKit. If I launch this executable as root, I also receive the crash reports. If I register it as a Launch Agent in a "user", or a "gui" domain, I still receive the crash reports. However, if I register it as a Launch Agent in the "system" domain, or as a Launch Daemon, I got this error from the CrashReport process. <<bundle ID>> is not a MetricKit client (I noticed the same error from MetricKit APIs in our system extension targets as well) I decided to open this new post here, because the solution we were talking about in post 724698 - delivering metric reports from system extensions to their host apps - may not apply here, since a Launch Daemon/Agent may not have a host app at all. What is the guidance if we want to receive these reports?
1
0
2.1k
May ’23
MetricKit for System Extension
I saw another post https://developer.apple.com/forums/thread/652719 where it was mentioned at this point MetricKit is not meant to be enabled within the App Extension targets and it's up to the container app to receive the payloads on behalf of the extensions. But what's the guidance to use MetricKit for System Extension targets on macOS? I've tried subscribing to diagnostic reports from both a container app and its system extension on macOS, neither could receive any payload from the system extension. (The subscriber within the container app did receive payloads for its own reports - e.g. when the container app crashed itself, so I'm somewhat sure my test code was set up properly)
2
0
1.6k
Feb ’23
How to get specific metric object from MetricKit using measure(metrics: metrics) results on XCUITest?
let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time XCTCPUMetric(), // to measure cpu cycles XCTStorageMetric(), // to measure storage consuming XCTMemoryMetric(), ] let measureOptions = XCTMeasureOptions.default measureOptions.iterationCount = 1 measure(metrics: metrics) { //App flow } I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it. Example - // let cpuMetric = CPU measure object should be here & I can get each information from this object. // let MemoryMetric = Memory measure object should be here & I can get each information from this object. But It's not available in XCUITest. We can only able to find it in the TestResult file. Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
Replies
0
Boosts
0
Views
653
Activity
Aug ’24
How specific metric object from measure(metrics: metrics) results on XCUITest using MetrixKit?
` let metrics: [XCTMetric] = [XCTClockMetric(), // to measure time XCTCPUMetric(), // to measure cpu cycles XCTStorageMetric(), // to measure storage consuming XCTMemoryMetric(), ] let measureOptions = XCTMeasureOptions.default measureOptions.iterationCount = 1 measure(metrics: metrics) { //App flow } ` I want to get values of XCTCPUMetric, XCTMemoryMetric, XCTStorageMetric etc in any variable so that if want to send it further somewhere I can do it. Example - // let cpuMetric = CPU measure object should be here & I can get each information from this object. // let MemoryMetric = Memory measure object should be here & I can get each information from this object. But It's not available in XCUITest. We can only able t find it in the TestResult file. Please suggest any code available to get each metric object & value in the XCUITest rather than the test result.
Replies
0
Boosts
0
Views
597
Activity
Aug ’24
Insufficient Metrics Data
No metrics data found for the latest app versions with sufficient usage. What is sufficient usage ? Can we define sufficient usage ourself ? if Yes then how ? https://developer.apple.com/videos/play/wwdc2020/10076/ wwwdc200 does mention factor of 5, but 5 of what ? and when where is the definition ? Organizer -> Metrics is useless if there is no data. If someone knows the fix please suggest.
Replies
2
Boosts
0
Views
1.1k
Activity
Jun ’24
Are the Hangs Collected by MetricKit All Longer Than One Second?
I have integrated MetricKit into my production app and listening for the corresponding callback func didReceive(_ payloads: [MXDiagnosticPayload]) After some time, I've noticed that the hang diagnostics data collected are all for hangs longer than 1 second. Does MetricKit only collect hang data for hangs longer than 1 second? Can this threshold be adjusted, for example, to 500ms? Is there any sampling involved in the collection of hang diagnostics? The number of hang events collected by MetricKit is significantly lower compared to other third-party platforms. Thank you for your response, this is very important to me.
Replies
1
Boosts
2
Views
785
Activity
May ’24
In statistical objects In MXMetricPayload histogrammedTimeToFirstDrawKey start times not equal applicationExitMetrics exit
In statistical objects In MXMetricPayload histogrammedTimeToFirstDrawKey start times not equal applicationExitMetrics exit: case1: "applicationExitMetrics": { "backgroundExitData": { "cumulativeNormalAppExitCount": 3, "cumulativeMemoryPressureExitCount": 4 }, "foregroundExitData": { "cumulativeMemoryResourceLimitExitCount": 3 } }, "applicationLaunchMetrics": { "histogrammedTimeToFirstDrawKey": { "histogramNumBuckets": 14, "histogramValue": { "10": { "bucketCount": 1, "bucketStart": "1740 ms", "bucketEnd": "1749 ms" }, "2": { "bucketCount": 1, "bucketStart": "1440 ms", "bucketEnd": "1449 ms" }, "3": { "bucketCount": 2, "bucketStart": "1490 ms", "bucketEnd": "1499 ms" }, "11": { "bucketCount": 1, "bucketStart": "1780 ms", "bucketEnd": "1789 ms" }, "4": { "bucketCount": 1, "bucketStart": "1500 ms", "bucketEnd": "1509 ms" }, "5": { "bucketCount": 1, "bucketStart": "1580 ms", "bucketEnd": "1589 ms" }, "12": { "bucketCount": 1, "bucketStart": "1860 ms", "bucketEnd": "1869 ms" }, "6": { "bucketCount": 1, "bucketStart": "1620 ms", "bucketEnd": "1629 ms" }, "13": { "bucketCount": 1, "bucketStart": "1990 ms", "bucketEnd": "1999 ms" }, "7": { "bucketCount": 1, "bucketStart": "1650 ms", "bucketEnd": "1659 ms" }, "0": { "bucketCount": 1, "bucketStart": "1400 ms", "bucketEnd": "1409 ms" }, "8": { "bucketCount": 1, "bucketStart": "1660 ms", "bucketEnd": "1669 ms" }, "1": { "bucketCount": 1, "bucketStart": "1430 ms", "bucketEnd": "1439 ms" }, "9": { "bucketCount": 1, "bucketStart": "1730 ms", "bucketEnd": "1739 ms" } } }, In this Case the app cold started 15 times, but quit only 10 times, why?? case2: "applicationExitMetrics": { "backgroundExitData": { "cumulativeMemoryPressureExitCount": 1 }, "foregroundExitData": { "cumulativeMemoryResourceLimitExitCount": 3, "cumulativeNormalAppExitCount": 1 } }, "applicationLaunchMetrics": { "histogrammedTimeToFirstDrawKey": { "histogramNumBuckets": 3, "histogramValue": { "0": { "bucketCount": 1, "bucketStart": "1490 ms", "bucketEnd": "1499 ms" }, "1": { "bucketCount": 1, "bucketStart": "1680 ms", "bucketEnd": "1689 ms" }, "2": { "bucketCount": 1, "bucketStart": "1880 ms", "bucketEnd": "1889 ms" } } }, The app cold started 3 times, but quit unexpectedly reached 5 times, why???
Replies
1
Boosts
1
Views
827
Activity
Apr ’24
Decoding crash report IPS metadata JSON keys
I've recently started working with IPS files, specifically crash reports. According to the documentation there are a number of metadata keys included in these payloads, however, I have found a number that are present in real ips files from device but are not documented. Does anyone know what version of iOS these 'new' metadata keys were introduced? How about if they're expected or if I should treat them as optional. https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report#IPS-metadata { "app_name":"ApplicationNameHere", "timestamp":"2024-02-15 08:05:05.00 -0600", "app_version":"1.6.0", "slice_uuid":"6b1f9f4e-3025-364f-9847-914fc1fe14d1", "build_version":"800", "platform":2, "bundleID":"reverse.domainname.bundleidentifier", "share_with_app_devs":1, "is_first_party":0, "bug_type":"309", "os_version":"iPhone OS 17.3.1 (21D61)", "roots_installed":0, "name":"ApplicationNameHere", "incident_id":"1CF0B8A1-EB43-46B3-AA9F-CFA8A9259190" } The following keys are not in the documentation: app_name, os_version, slice_uuid, share_with_app_devs, is_first_party, roots_installed I created this feedback to request the documentation be updated with current state. FB13631161 - Developer Documentation: Update IPS metadata to reflect latest values found in IPS Metadata JSON
Replies
1
Boosts
0
Views
3.6k
Activity
Feb ’24
Metrickit opt in rate and actual crash numbers dont match
The crash data opt in rate is 36% for my app. I have another crash reporting framework PLC in the app. The total number of crashes reported by MetricKit health report was 43% of the total crash count from PLC in May. This almost matched the 36% opt in rate. In the month of June we fixed a series of crashes. Now the total number of crashes reported by MetricKit health report is 80% of the total crash count from PLC. The crash data opt in rate has stayed at 36% for the past 90 days and I am not able to understand how the ratio flipped from 43% to 80%. Looking for guidance here.
Replies
5
Boosts
0
Views
2.2k
Activity
Feb ’24
HUD guide
Hello, I am looking for a guide on what the HUD graph axis' are, with my main curiosity around the GPU metering. Is this number the load average of the cores, similar to the load avg you see in uptime/top or is it another descriptor? I've not been able to refer to a man page or the readme for this, google searches have yielded me many ways to disable the HUD, but no guide
Replies
2
Boosts
0
Views
1k
Activity
Feb ’24
MetricKit MXCallStackTree symbolication
I am trying to implement MetricKit so later I could analyze MXCrashDiagnostic and MXHangDiagnostic reports. However when I am triggering a test crash, Here is an example of what I get for MXCrashDiagnostic: iente "timeStampEnd": "2021-06-07 15:59:00 +0000", "crashDiagnostics": [ { "version": "1.0.0", "callStackTree": { "callStacks": [ { "threadAttributed": true, "callStackRootFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "DC2EACEA-3D9C-3409-96C2-2DF9C89AD19D", "offsetIntoBinaryTextSegment": 6917586944, "sampleCount": 1, "subFrames": [ { "binaryUUID": "35463E49-9534-3644-B993-2A73C287A143", "offsetIntoBinaryTextSegment": 4329963520, "sampleCount": 1, "binaryName": "demo", "address": 4333717704 }] I tried to symbolicate the the data, by executing commands: atos -arch arm64e -o /Users/xxx/Downloads/!dsym-4/demo.app.dSYM/Contents/Resources/DWARF/demo 4333717704 But I can't find the crash stack and the result returned is 4333717704 the DSYM file uuid is UUID: 35463E49-9534-3644-B993-2A73C287A143 (arm64) /Users/xxx/Downloads/!dsym-3/demo.app.dSYM/Contents/Resources/DWARF/demo How should the stack returned by MetrickIt be symbolized? Who can tell me very grateful
Replies
3
Boosts
1
Views
3.3k
Activity
Dec ’23
WatchDog failed to terminate gracefully after 5.0s
{signal=SIGKILL, exceptionCode=0x00000000, virtualMemoryRegionInfo=unkown, terminationReason=<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<com.***.***>:3682] failed to terminate gracefully after 5.0s ProcessVisibility: Background ProcessState: Running WatchdogEvent: process-exit WatchdogVisibility: Background WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 12.680 (user 7.120, system 5.560), 41% CPU", "Elapsed application CPU time (seconds): 1.309, 4% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive>} i have no idea about this crash. who can explain this for me? what cause this problem? when does this problem occur?
Replies
1
Boosts
0
Views
2.4k
Activity
Oct ’23
MetricKit and when or when not do we get reports?
The MetricKit implementation is pretty straight forward. I am testing it now for a couple of days, but I never saw any report passed to my test apps. (implemented it in an empty app that just crashes every now and then and in a product of ours) The function 'didReceive' is never called and each time I am asking 'MXMetricManager.shared.pastDiagnosticPayloads' I get an empty collection. So that is the secret here? Is MetricKit not working for development builds? Or are there other factors/requirements not meet? import Foundation import MetricKit class CrashDetection: NSObject, MXMetricManagerSubscriber { @objc static let shared = CrashDetection() @objc private override init() { } internal static var crashDidOccur: Bool { get { UserDefaults.standard.bool(forKey: crashDidOccurKey) ?? false } set { UserDefaults.standard.set(newValue, forKey: crashDidOccurKey) } } @objc func start() { MXMetricManager.shared.add(self) } @objc func stop() { MXMetricManager.shared.remove(self) } func didReceive(_ payloads: [MXDiagnosticPayload]) { let crashDiagnostics = payloads.compactMap({ $0.crashDiagnostics }) CrashDetection.crashDidOccur = crashDiagnostics.isEmpty == false } }
Replies
1
Boosts
0
Views
1.8k
Activity
Sep ’23
Requesting additional information with MXAppExitMetric payload.
Hi all, my company is looking more into MetricKit's MXAppExitMetric. The existing breakdown of exit reasons is very helpful but we are hoping to find a way to link these exits with a timestamp. This would help us to correlate app exits with other events that we are tracking on our side. Are there plans currently plans to add more granularity to this payload? If not, how can I submit an official request to do so?
Replies
3
Boosts
0
Views
1.2k
Activity
Sep ’23
Empty callStackRootFrames on MXCrashDiagnostic
Hi folks! My iOS app has the MetricKit integration, and I'm processing the reports on my server. While looking at some MXCrashDiagnostic reports, I saw certain reports that has threadAttributed property as true, but callStackRootFrames is just an empty array. So the report looks like the following example "callStacks" : [ { "threadAttributed" : true, "callStackRootFrames" : [ ] }, // ... // other callstacks where threadAttributed is false // but callStackRootFrames is not empty ] Looking at the documentation I can see threadAttributed is used to determine if the crash/exception occurred in this crash. So I can't understand how callStackRootFrames can be empty when threadAttributed is true. Is this a bug or an expected behavior? Also, is there a case where the crash/exception report does not have any callstack with threadAttributed as true? From the definition, it feels like there should always be exactly one attributed thread on each crash report. Thanks for the help!
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’23
使用Xcode的Simulate MetricKit Payloads,发现在iOS16.x机型didReceiveDiagnosticPayloads不回调
使用Xcode的Simulate MetricKit Payloads,在iOS16.x设备上,didReceiveMetricPayloads能正常回调,但didReceiveDiagnosticPayloads不回调
Replies
0
Boosts
0
Views
1k
Activity
Jul ’23
Can't get a cumulativeHitchTimeRatio metric from MetricKit
Hello guys! I'm trying to collect metrics for each UIViewController in my iOS app. I can see all aggregated metrics except the cumulativeHitchTimeRatio one. I created a sample project and run UI test for more than 2 hours to allow Apple MetricKit to collect the metrics. When I run measure UI test it collects needed data well (look attached screenshots), but, unfortunately, I receive empty signpostMetrics array next day (json attached) in the didReceive(_:) method. Could you help me to understand how to get the cumulativeHitchTimeRatio metric from the MetricKit framework?
Replies
3
Boosts
0
Views
1.9k
Activity
Jul ’23
Not receiving Metric Kit payload
Hello all, I wanted to get MXMetricPayload to analyse some App metrics. And for some reason the method func didReceive(_ payloads: [MXMetricPayload]) from mxMetricManager is not being executed. For this I created a Class: import MetricKit public final class MetricKitManagerImpl: NSObject, MetricKitManager { public static let shared: MetricKitManager = MetricKitManagerImpl(mxMetricManager: MXMetricManager.shared) private let mxMetricManager: MXMetricManager private init( mxMetricManager: MXMetricManager ) { self.mxMetricManager = mxMetricManager super.init() mxMetricManager.add(self) } deinit { mxMetricManager.remove(self) } public func didReceive(_ payloads: [MXMetricPayload]) { payloads.forEach { if let scrollHitchTimeRatio = $0.animationMetrics?.scrollHitchTimeRatio.value { sendToSomeWhere(scrollHitchTimeRatio) } } } } Then on the AppDelegate on didFinishLaunchingWithOptions I do: private(set) var metricsManager: MetricKitManager! func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil ) -> Bool { self.metricsManager = MetricKitManagerImpl.shared ... } With this setUp I am able to receive the debug playload (triggered from Xcode Menu. Debug -> Simulate Metrik Kit Payload). However, after using the app for some days, I did not receive any real payload. Did anyone experience this? What am I doing wrong? Thanks a lot in advance! Miguel Franco
Replies
1
Boosts
0
Views
1.4k
Activity
Jun ’23
How to implement GA4 IOSTV and IOS mobile
how to implement GA4 without measurement id
Replies
1
Boosts
0
Views
1.2k
Activity
May ’23
MetricKit doesn't work for system Launch Daemons/Agents
This is related to my post https://developer.apple.com/forums/thread/724698 where I submitted an issue that MetricKit reports didn't work for System Extensions on mac. I've come to realize that this is also true for Launch Daemons/Agents in the system domain (and so it probably also explains the System Extension case as I understand System Extensions are somewhat like Launch Daemons). I have a "thin executable" (a Command Line Tool target) that registers with MetricKit reports and then just crashes itself. Here's the scenarios I've tested - If I launch this executable as the current user, I receive the crash reports from MetricKit. If I launch this executable as root, I also receive the crash reports. If I register it as a Launch Agent in a "user", or a "gui" domain, I still receive the crash reports. However, if I register it as a Launch Agent in the "system" domain, or as a Launch Daemon, I got this error from the CrashReport process. <<bundle ID>> is not a MetricKit client (I noticed the same error from MetricKit APIs in our system extension targets as well) I decided to open this new post here, because the solution we were talking about in post 724698 - delivering metric reports from system extensions to their host apps - may not apply here, since a Launch Daemon/Agent may not have a host app at all. What is the guidance if we want to receive these reports?
Replies
1
Boosts
0
Views
2.1k
Activity
May ’23
MetricKit for System Extension
I saw another post https://developer.apple.com/forums/thread/652719 where it was mentioned at this point MetricKit is not meant to be enabled within the App Extension targets and it's up to the container app to receive the payloads on behalf of the extensions. But what's the guidance to use MetricKit for System Extension targets on macOS? I've tried subscribing to diagnostic reports from both a container app and its system extension on macOS, neither could receive any payload from the system extension. (The subscriber within the container app did receive payloads for its own reports - e.g. when the container app crashed itself, so I'm somewhat sure my test code was set up properly)
Replies
2
Boosts
0
Views
1.6k
Activity
Feb ’23
Not receiving MetricKit Signposts
I'm posting signposts using the mxSignpost(...) calls. My MXMetricManagerSubscriber is receiving standard metrics, but never my signposts. Is this a known bug? If not, what could be causing them to be missing? My iPhone is running iOS 14.4. Thanks, Tom
Replies
1
Boosts
0
Views
2.0k
Activity
Feb ’23