Features
- Add
options.experimental.metrickit.enabledDiagnosticReportsto choose which MetricKit diagnostic reports the SDK captures, including crash diagnostics. The option is only available from Swift (#9267) - Add
attachAllThreadsand scope block overloads forcapture(event:),capture(error:),capture(exception:), andcapture(message:), also available throughSentryObjC(#9424) - Align the metrics API with the other Sentry SDKs:
SentrySDK.metrics.count(_:value:options:),gauge(_:value:options:)anddistribution(_:value:options:)take the metric name, the value andSentryMetricOptionswithunit,attributes,scopeandtimestamp.SentryObjCexposes the same API throughcount:value:options:,gauge:value:options:,distribution:value:options:andSentryObjCMetricOptions. The key-based methods such ascount(key:value:attributes:)andcountWithKey:value:attributes:keep working but are deprecated and will be removed in v10; use the options-based methods instead (#9453) - Capture MetricKit app launch diagnostics on iOS 16 and later and on visionOS when
options.experimental.metrickit.enabledDiagnosticReportscontains.appLaunch(#9441) - Expose
options.experimental.metrickit.enabledDiagnosticReportsthrough the SentryObjC SDK asoptions.experimental.metrickitand through themetrickitkey of the options dictionary (#9296) - Add breadcrumbs when the hinge of foldable devices such as iPhone Duo opens, closes, or reaches the fully open or closed position, and report the current hinge status as
hinge_statusin the device context, which requires iOS 27.1 or later and is not available on Mac Catalyst (#9464) - Add
options.experimental.metrickit.enabledMetricReportsto send MetricKit metric payloads as Sentry metrics, such as CPU time, network transfer, memory and app exit counts. Metrics are namedmetrickit.<group>.<name>and carry the app and OS versions they were recorded with. The option defaults to an empty set and is only available from Swift (#9452)
Fixes
- Wait for transactions that are still being captured on a background thread when calling
flushorclose, so short-lived processes no longer lose a transaction finished right before the call (#9415) - Keep pending Session Replay video when
SentrySDK.replay.stop()followsflush()(#9429) - Stop reporting a false watchdog termination on the launch after
SentrySDK.close()when app start tracking isn't installed, such as withenableAutoPerformanceTracingdisabled (#9451) - Prevent NSException crash handling from deadlocking when a suspended thread holds a lock needed to read or format exception metadata (#9463)