Repository navigation
Conversation
Cover enabledDiagnosticReports, enabledMetricReports and hangReportingMode, list the metric reports with their names, types and units, and explain how delayed MetricKit data is reported. Fix the visionOS and macOS feature lists. Fixes COCOA-2037
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Document the memory exception diagnostic, the MetricManager reports on xOS 27, the metric reports in SentryObjC, the animation and Metal reports, the histogram reports and the diagnostic environment attributes.
MetricKit sat under Extended Configuration as a single page. Move it to its own section under Features, with one page for app hangs and other diagnostic reports and one for metric reports. The old URL redirects to the new section.
Point the diagnostic links to the MetricKit types that replace the MX-prefixed ones, and link MetricManager. Replace the crash and memory exception warnings with one note that the SDK tries to deduplicate these events, but some can show up twice.
|
Getting ready to monitor this change · Rollout details
|
| Flame graph attachments are subject to these limits: | ||
|
|
||
| - Attachments count toward your attachment quota, and the associated hang events count toward your error-event quota. No profiling quota is consumed. Attachment retention and access permissions apply. | ||
| - Each attachment is limited to 10 MiB. If the SDK cannot create it, for example because sample counts are invalid or the payload exceeds this limit, it falls back to storing the tree in the event's stack trace. | ||
| - Sentry symbolicates at most the first 2,500 frame entries in an attachment. Additional frames remain in the graph but may be unresolved. Missing debug information can also leave frames unresolved. |
There was a problem hiding this comment.
m: We should add a reference to the specification so these don't become magic numbers
|
|
||
| ## Delayed Data | ||
|
|
||
| MetricKit reports data after it was recorded. It delivers diagnostic reports on the next launch of the app. |
There was a problem hiding this comment.
m: This is not true. MetricKit can report diagnostic reports in the same lifespan of the app it happened in. We should rephrase this that MetricKit provides historic data both for the current and previous runs
| [MetricKit](https://developer.apple.com/documentation/metrickit) is Apple's framework for the diagnostics and metrics the operating system collects about your app on your users' devices. The MetricKit integration converts two kinds of MetricKit data: | ||
|
|
||
| - **Diagnostic reports**, such as app hangs, CPU and disk write exceptions, or slow app launches, become Sentry error events. Learn more in <PlatformLink to="/metric-kit/diagnostic-reports/">App Hangs and Other Diagnostic Reports</PlatformLink>. | ||
| - **Metric reports**, such as CPU time, network transfer, memory and app exit counts, become <PlatformLink to="/metrics/">Sentry metrics</PlatformLink>. Learn more in <PlatformLink to="/metric-kit/metric-reports/">Metric Reports</PlatformLink>. |
There was a problem hiding this comment.
m I think our product name is "Application Metric" not "Sentry metric"
|
|
||
| ## Volume and Attributes | ||
|
|
||
| MetricKit delivers metric payloads about once a day, so metrics can arrive up to a day after the values were recorded. Each enabled report adds up to one metric per payload, except for [histogram reports](#histogram-reports), which add up to about 100. Metrics count towards your metrics quota. Counts of zero aren't sent. Every metric is placed in the middle of the payload's reporting interval and carries these attributes: |
There was a problem hiding this comment.
l: We could reference Apple docs here:
MetricKit collects metric data continuously and delivers a MetricReport about the previous 24 hours. The MetricReport is delivered, at most, once per day when conditions permit. [....] MetricKit delivers each DiagnosticReport immediately after the event occurs, so you can respond to crashes, hangs, and other diagnostic events without waiting for the daily metric report.
DESCRIBE YOUR PR
Document the MetricKit options shipped in Cocoa 9.31.0 to 9.35.0, and move the MetricKit docs from Extended Configuration to their own section under Features. The MetricKit page only described
enableMetricKitand hang diagnostics, and the options page didn't list the experimental MetricKit options.New MetricKit section under Features
/platforms/apple/configuration/metric-kit/becomes/platforms/apple/metric-kit/, with a redirect from the old URL. The section has an overview page and two subpages:options.experimental.metrickit.enabledDiagnosticReportswith the available reports, theirmechanism.typeand platforms, how the option interacts withenableMetricKit, and the note that.crashand.memoryExceptioncan report events the SDK's crash handler and watchdog termination tracking already reported, which the SDK tries to deduplicate. The links to Apple's documentation point to the new MetricKit API. It also covers the raw payload attachment and that events from earlier runs carry the app and OS versions of that time without the current scope.enabledMetricReportsfor Swift and SentryObjC with every metric name, type, unit and availability, the metric attributes, the reports onlyMetricManagerprovides on iOS and macOS 27, and how histograms are sent as distributions.Options page and feature lists
The options page lists the three experimental MetricKit options and drops the outdated note that MetricKit lets the SDK apply the current scope. The visionOS feature list no longer says MetricKit is unavailable, and the macOS list no longer says it's enabled by default. Links to the MetricKit page point to the new section.
The deduplication of MetricKit crashes (getsentry/sentry-cocoa#9584) isn't released yet, so the note needs the SDK version once it ships.
Fixes COCOA-2037
Fixes getsentry/sentry-cocoa#9279
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES