Repository navigation
Releases
Releases · getsentry/sentry-cocoa
9.35.0
Features
- Add
options.webViewTracingto connect the traces of everyWKWebViewautomatically, keeping the trace current across page loads (#9538)- Expose
options.webViewTracingthrough the SentryObjC SDK asSentryObjCOptions.webViewTracing(#9539) - See the WebView docs for details.
- Expose
- Add the
launchTimeToFirstDraw,launchResumeTime,launchOptimizedTimeToFirstDraw,launchExtended,responsivenessHangTimeandcellularConditionTimemetric reports, which send MetricKit histograms as distributions with one value per sample, up to about 100 values per histogram (#9493) - Report the low power mode and TestFlight state that MetricKit records with a diagnostic of a previous app run as
device.low_power_modeand anapp.build_typeoftest, and takeapp.app_identifierfrom the diagnostic instead of the running app (#9523)
Fixes
- Read
attachAllThreads,enableDataSwizzlingandenableStandaloneAppStartTracingfrom the options dictionary that hybrid SDKs pass to the native SDK (#9586) - Preserve a fallback stack trace and the crashing thread when the experimental C++ exception monitor (V2) misses a throw hook (#9612)
Improvements
- Match Session Replay network detail allow and deny URL patterns once per URL session task and reuse the decision for later state changes and response capture, instead of matching on every call (#9316)
9.30.3 (Stable)
9.29.3 (Stable)
9.34.0
Features
- Add opt-in
options.enableScopePersistenceto retain explicitly supplied user information across app launches. Storage and restoration are asynchronous, and independent of watchdog tracking and automatic user collection settings (#9470) - Give every run of the app an ID and store it in crash reports and the app state, so the SDK can match events from the crash handler, the watchdog termination integration and MetricKit that describe the same run. The ID is only used on the device and is not sent to Sentry (#9578)
Fixes
9.33.0
Breaking Changes
- Add the
animationTotalHitchTime,animationTotalAnimationTime,metalFramesPerSecond,metalFrameCountandmetalActiveDrawingDurationcases to the experimentalSentryMetricKit.MetricReportenum, so exhaustiveswitchstatements over it need to handle them. On iOS and macOS 27 and later,animationScrollHitchTimeRatiois no longer sent because MetricKit only reports the hitch time of all animations (#9476)
Features
- Expose
options.experimental.metrickit.enabledMetricReportsthrough the SentryObjC SDK as theSentryObjCMetricKitMetricReportbitmask and through theenabledMetricReportskey of themetrickitoptions dictionary, which also accepts"all"(#9490) - Receive MetricKit metrics through
MetricManageron iOS and macOS 27 and later with the same names, types and units as on earlier OS versions, and add theanimationTotalHitchTime,animationTotalAnimationTime,metalFramesPerSecond,metalFrameCountandmetalActiveDrawingDurationmetric reports that onlyMetricManagerprovides, also available through theSentryObjCMetricKitMetricReportbitmask (#9476) - Connect traces of web content in a
WKWebViewwith the app's trace. CallSentryWebViewTracing.addTracePropagation(to:options:)with aWKWebView,WKWebViewConfiguration,WKUserContentController, or SwiftUIWebPage.Configurationto inject the current trace assentry-traceandbaggagemeta tags before page scripts run, so@sentry/browserin the page continues the trace on pageload. Only pages on the hosts inSentryWebViewTracingOptions.allowedHostsreceive the trace (#9474)- Expose WebView trace propagation through the SentryObjC SDK as
SentryObjCWebViewTracingandSentryObjCWebViewTracingOptions(#9488) - See the WebView docs for details.
- Expose WebView trace propagation through the SentryObjC SDK as
Fixes
- Report the tvOS OS name as
tvOSin profiles instead of occasionally reportingApple TVOS(#9497) - Fix trace-lifecycle profiling getting stuck after backgrounding when a root transaction remains active or is abandoned. Parented transactions no longer start or keep the profiler running (#9481)
- Prevent sampled backtraces from being dropped when continuous profiling starts a new chunk (#9485)
- Prevent stale profiling callbacks from affecting restarted profilers or routing queued chunks to a replacement SDK client (#9491)
- Prevent stale trace-profiler timers from stopping replacement profiles or shortening their timeout (#9492)
- Fix app start transactions from hybrid SDKs such as React Native being dropped for prewarmed app starts.
SentrySDK.internal.appStart.measurementWithSpansadded the Pre Runtime Init and Runtime init to Pre Main initializers spans only for prewarmed app starts, where Pre Runtime Init ended before it started, and left them out of all other app starts (#9473) - Prevent SentryCrash from deadlocking while handling uncaught C++ exceptions, and keep concurrent throws from overwriting another thread's captured stack trace (#9531)
- Count every batched log and metric in client reports when an envelope is rate limited, dropped from the cache, or fails to send, instead of counting one per envelope item (#9530)
- Preserve profiling metrics across chunk rollover and avoid recording a finished trace's metrics on its replacement profiler (#9500)
- Synchronize profiling energy-counter readings and prevent invalid energy spikes when cumulative counters decrease (#9517)
9.32.0
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)
9.31.0
Features
- Add experimental MetricKit hang flame graph attachments via
options.experimental.metrickit.hangReportingMode = .flamegraphAttachment, also available throughSentryObjC. The default.legacymode reports the flattened call stack tree, which is also retained when flame graph attachment creation fails (#9347)
This feature is not fully available yet and under active development. Please reach out if you want early access.
Fixes
- Resolve the application state at
UIApplicationDidFinishLaunchingNotificationwhen the SDK starts beforeUIApplicationexists, such as from a SwiftUIApp.init. A process launched in the background was treated as active for its whole lifetime, which let the app hang tracker report fatal app hangs with an idle main thread (#8988) - Keep the UI profiler running when
SentrySDK.startProfiler()is called before a requested stop takes effect at the end of the current chunk (#9401) - Increase the crash report read limit in SentryCrash to 20 MB (#9386)
- Stop applying the current scope, app state and mutable device data to MetricKit events from an earlier app run. These events carry the app and OS versions of the diagnostic and the stable device attributes, while breadcrumbs, user, tags, extras, scope attachments and the current replay stay out. Diagnostics recorded by the running process keep the scope data (#9297)
Internal
- Add scope and debug image serialization APIs for hybrid SDKs through
SentrySDK.internal.serializerandSentryObjCSDK.internal.serializer(#9403).
The publicSentrySerializableprotocol andserialize()methods will be removed in the next major release.
9.30.2
Fixes
- Fix a data race on the span end timestamp that could crash in
SentryTracer.trimEndTimestampwhen a child span finishes on another thread while its transaction finishes (#9305) - Validate feedback payloads before transport and align the managed form's message counter and errors with the cross-SDK input validation specification (#8973)
- Read the initial
UIApplication.applicationStateasynchronously on the main queue when the SDK's dependency container is first accessed off the main thread, instead of blocking the calling thread while waiting for the main thread during app launch (#9304) - Prevent crash report buffer overflows when flushing pending data fails (#9317)
- Exempt symbol images from Session Replay masking using the public
isSymbolImageAPI without inspecting their image assets (#9335) - Fix an
EXC_BAD_ACCESScrash while reading the cellular network technology on iOS. The SDK now copies the value from CoreTelephony under the lock that CoreTelephony uses to change it (#9332) - Avoid crash-handler deadlocks caused by SDK debug logging or NSException backtrace memory management while other threads are suspended (#9324)
- Prepare NSException backtraces before suspending other threads, and resume them before releasing the backtrace buffer.
- NSException-monitor debug and warning diagnostics now use the async-safe logger's compile-time threshold (
ERRORby default), so runtime debug options no longer enable them.
- Prevent Session Replay image redaction from changing archived images' rendered size while preserving masking exemptions for bundled images and system symbols (#9344)
- Fix an
EXC_BAD_ACCESScrash incow_cleanupwhen aURLSessionTaskchanges state while another thread writes protocol properties into its request. The network tracker now reads the task's requests without copying them to SwiftURLRequestvalues (#9343) - Prevent crash report buffer overflows and file descriptor leaks when the report writer receives file descriptor zero (#9341)
9.30.1 (Stable)
Fixes
- Fix app freeze during crash handling when attaching a crash-time screenshot or view hierarchy with a Swift (MainActor) scene delegate under UIScene (#9282)
- Parse crash reports whose NSException reason exceeds the previous 150KB JSON string buffer, and truncate the exception value to 512 characters so the event stays within the 1MiB ingestion limit (#9256)
- Report MetricKit events with the app and OS versions the diagnostic was recorded on instead of the versions running when MetricKit delivered it. The app context of these events only carries the identifier, version and build, and the OS context only the name, version and build, because the other attributes of the running app and device are unknown for the diagnostic (#9266)
- Avoid evaluating Swift SDK debug, info, warning, and error log messages when logging is disabled or filtered by the diagnostic level (#9283)
- Remove SDK frames from current-thread stacktraces when the SDK is loaded from the
SentryObjCframework or dylib (#9286)
9.30.0 (Stable)
Features
- Update option stability without changing defaults (#9134, #9175):
enableUnhandledCPPExceptionsV2remains non-deprecated underoptions.experimentalin v9, disabled by default, with dictionary-based initialization support.enablePersistingTracesWhenCrashingis now stable and remains disabled by default.attachViewHierarchyis now stable and remains disabled by default.enableTimeToFullDisplayTracingis now stable and remains disabled by default because applications must explicitly callSentrySDK.reportFullyDisplayed().swiftAsyncStacktracesis now stable and remains disabled by default.enableGraphQLOperationTrackingis now stable and remains disabled by default.enableFileManagerSwizzlingis now stable, remains disabled by default, and supports dictionary-based initialization.
- Add
connection_typeto the device context of events, which reportswifi,ethernet,cellular, ornone(#9097).
On iOS, cellular connections additionally report the network technology inconnection_effective_type, for example4gor5g.
Fixes
- Keep standalone
@objcextensions in static builds by adding referenced dummyNSObjectsubclasses, and lint for this with a SwiftSyntax SwiftLint extra rule (#9160) - Send envelopes captured during a connectivity-triggered cache drain without waiting for another trigger (#9171)
- Preserve full resolution when masking feedback, error, and crash screenshots, including screenshots captured through the React Native bridge, without changing Session Replay resolution or redactions (#9179)
- Compact raw MetricKit diagnostic attachments to reduce their upload size and attachment quota usage (#9183)