You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of version 8.50.0, you can enable AppHangsV2, which is available on iOS and tvOS. The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs, which you might choose to ignore, and measures the duration of app hangs. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user, but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked.
137
+
As of version 8.50.0, you can enable AppHangsV2, which is available on iOS and tvOS. **Starting with version 9.0.0, App Hangs V2 is enabled by default.**The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs, which you might choose to ignore, and measures the duration of app hangs. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user, but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked.
138
138
139
139
The SDK sets the `exception.type` to `App Hang Fully Blocked` or `App Hang Non Fully Blocked`, so you can filter for App Hangs via `error.type` in Sentry.
140
140
141
-
To enable the feature:
141
+
To enable the feature in version 8.50.0 and later (enabled by default starting with 9.0.0):
142
142
143
143
```swift {tabTitle:Swift}
144
144
importSentry
@@ -190,7 +190,7 @@ SentrySDK.start { options in
190
190
191
191
<Alert level="info">
192
192
193
-
The SDK supports App Hang Rate calculation starting with version 8.50.0. Additionally, you have to enable App Hangs V2 via `options.enableAppHangTrackingV2 = true` in your SDK configuration.
193
+
The SDK supports App Hang Rate calculation starting with version 8.50.0. For versions 8.50.0 to 8.x, you have to enable App Hangs V2 via `options.enableAppHangTrackingV2 = true` in your SDK configuration. **Starting with version 9.0.0, App Hangs V2 is enabled by default.**
Copy file name to clipboardExpand all lines: docs/platforms/apple/common/migration/index.mdx
+120-1Lines changed: 120 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,126 @@ title: Migration Guide
3
3
sidebar_order: 8000
4
4
---
5
5
6
-
To upgrade from version 4.x of the SDK to version 8.x of the SDK, you must first migrate from 4.x to 5.x, then 5.x to 6.x, then 6.x to 7.x, and finally from 7.x to 8.x.
6
+
To upgrade from version 4.x of the SDK to version 9.x of the SDK, you must first migrate from 4.x to 5.x, then 5.x to 6.x, then 6.x to 7.x, 7.x to 8.x, and finally from 8.x to 9.x.
7
+
8
+
## Migrating From 8.x to 9.x
9
+
10
+
Migrating to 9.x from 8.x includes several breaking changes. We provide this guide to help you update your SDK.
11
+
12
+
### Changes to Minimum OS Versions and Xcode
13
+
14
+
We bumped the minimum supported OS versions to:
15
+
-**iOS**: 15.0 (previously 11.0)
16
+
-**macOS**: 10.14 (previously 10.13)
17
+
-**tvOS**: 15.0 (previously 11.0)
18
+
-**visionOS**: 1.0 (unchanged)
19
+
-**watchOS**: 8.0 (previously 4.0)
20
+
21
+
We now build the precompiled XCFramework with **Xcode 16**. To submit to the App Store, Apple now requires Xcode 16. If you need a precompiled XCFramework built with Xcode 15, continue using Sentry SDK 8.x.x.
22
+
23
+
Additionally, the Package.swift sets `swift-tools-version` to 6.0.
24
+
25
+
### Features Enabled by Default
26
+
27
+
We now enabled the following features by default:
28
+
29
+
-**Performance V2 is enabled by default**: The app start duration now finishes when the first frame is drawn instead of when the OS posts the `UIWindowDidBecomeVisibleNotification`. We removed the `enablePerformanceV2` option.
30
+
-**Pre-warmed app start tracking**: The SDK now collects pre-warmed app starts by default via `enablePreWarmedAppStartTracing`.
31
+
- <PlatformLinkto="/configuration/app-hangs/#app-hangs-v2">App hang tracking V2</PlatformLink>: This is now the default and we removed the option to enable/disable it.
32
+
33
+
### Disable App Hang Tracking for Extensions
34
+
35
+
We now automatically disable app hang tracking for: Widgets, Live Activities, Action Extensions, (Siri) Intent Extensions, Share Extensions. These components run in separate processes or sandboxes with different execution characteristics, which can cause false positive app hang reports.
36
+
37
+
### Structured Logging
38
+
39
+
We moved structured logging options out of experimental and made them part of the main API. We added log APIs to `Hub` and `Client`, and logs now include a `sentry.replay_id` attribute.
40
+
41
+
#### HTTP Client Errors
42
+
43
+
HTTP client errors now mark sessions as errored. This provides better visibility into failed network requests in your release health data.
44
+
45
+
### Profiling Changes
46
+
47
+
We removed all deprecated profiling APIs in version 9.0.0. The only supported profiling method is now <PlatformLinkto="/profiling/#enable-ui-profiling">UI Profiling</PlatformLink> (also known as continuous V2 profiling), which was introduced in version 8.49.0.
48
+
49
+
**Removed deprecated profiling options from `SentryOptions`:**
50
+
-`profilesSampleRate` - used for transaction-based profiling (deprecated)
51
+
-`profilesSampler` - used for transaction-based profiling (deprecated)
52
+
-`enableAppLaunchProfiling` - used for launch profiling (deprecated)
53
+
54
+
**Migration to UI Profiling:**
55
+
56
+
If you were using any of the deprecated profiling options, you need to migrate to UI Profiling. Configure profiling by assigning a closure to `SentryOptions.configureProfiling`:
57
+
58
+
```swift
59
+
importSentry
60
+
61
+
SentrySDK.start { options in
62
+
options.dsn="___PUBLIC_DSN___"
63
+
options.configureProfiling= {
64
+
$0.sessionSampleRate=1
65
+
$0.lifecycle= .manual// or .trace for trace-based lifecycle
66
+
}
67
+
}
68
+
```
69
+
70
+
For more information, see the <PlatformLinkto="/profiling/#enable-ui-profiling">UI Profiling documentation</PlatformLink>.
71
+
72
+
### Breaking Changes
73
+
74
+
#### Option Changes
75
+
76
+
-`enableFileManagerSwizzling` is now a top-level non-experimental option and remains disabled by default.
77
+
-`enableDataSwizzling` is now a top-level option and is enabled by default.
78
+
- We increased the maximum attachment size to 200MB (previously 20MB)
79
+
- We removed the following methods and properties:
80
+
-`inAppExclude` (it had no effect)
81
+
-`integrations`
82
+
-`defaultIntegrations()`
83
+
-`enableTracing` (use `tracesSampleRate` or `tracesSampler` instead)
84
+
-`getStoreEndpoint()`
85
+
86
+
#### Behavioral Breaking Changes
87
+
88
+
- The default trace context status is now `ok` instead of `undefined`.
89
+
- The `function` property on `SentryFrame` now defaults to `nil` instead of `"<redacted>"`
90
+
- The `value` and `type` properties on `SentryException` are now nullable; when `NSException` has no reason, `type` is set to `nil`
91
+
92
+
#### Renamed APIs
93
+
94
+
- We renamed `SentryStructuredLogLevel` to `SentryLogLevel`
95
+
- We renamed `SentryStructuredLogAttribute` to `SentryLogAttribute`
96
+
97
+
#### Removed APIs
98
+
99
+
- We removed the `segment` property from `SentryTraceContext`, `SentryUser`, and `SentryBaggage`
100
+
- We removed the initializers from `SentryTraceContext`
101
+
- We removed `SentryDsn.getHash()`
102
+
- We removed `SentryFrame.instruction`
103
+
104
+
We removed the following deprecated APIs:
105
+
106
+
-`SentrySpan.setExtraValue(_:forKey:)`
107
+
- User feedback API (use the new feedback API instead)
108
+
-`Scope.useSpan()` (use `Scope.span` instead)
109
+
-`SentryDebugMeta.uuid` (use `debugID` instead)
110
+
-`SentryDebugMeta.name` (use `codeFile` instead)
111
+
112
+
We made the following classes and APIs private:
113
+
114
+
-`SentryEventDecoder` and `SentryEventDecodable`
115
+
-`SentryEnvelopeItemHeader`
116
+
-`SentryIntegrationProtocol`
117
+
-`SentrySession`
118
+
-`SentrySDKInfo`
119
+
-`SentryDebugImageProvider`
120
+
121
+
#### Other breaking changes
122
+
123
+
- We made the following classes `final`: `PreviewRedactOptions`, `SentryProfileOptions`, `SentryRedactViewHelper`, `SentryViewScreenshotOptions`, `SentryReplayOptions`, `SentryUserFeedbackConfiguration`, `SentryUserFeedbackFormConfiguration`, `SentryUserFeedbackThemeConfiguration`, `SentryUserFeedbackWidgetConfiguration`, `SentryFeedback`, and `SentryExperimentalOptions`
124
+
125
+
For a complete list of changes, see the [Changelog of version 9.0.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.0.0)
Copy file name to clipboardExpand all lines: docs/platforms/apple/common/profiling/index.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ notSupported:
20
20
21
21
<Alert>
22
22
23
-
UI Profiling was introduced in SDK version 8.49.0. All prior profiling API are deprecated and will be removed in a future major version of the SDK.
23
+
UI Profiling was introduced in SDK version 8.49.0. All prior profiling APIs were removed in version 9.0.0.
24
24
25
25
</Alert>
26
26
@@ -48,7 +48,7 @@ SentrySDK.start { options in
48
48
}];
49
49
```
50
50
51
-
By default, `sessionSampleRate` is `0`, so you'll need to set it to a higher value to receive profile data. `sessionSampleRate` is evaluated once per user session and applies to any attempt to start a profile until the next user session starts. See <PlatformLink to="/configuration/releases/#sessions">user session documentation</PlatformLink> for more information on user sessions.
51
+
By default, `sessionSampleRate` is `0`, so you'll need to set it to a higher value to receive profile data. `sessionSampleRate` is evaluated once per user session and applies to any attempt to start a profile until the next user session starts. See <PlatformLink to="/configuration/releases/#sessions">user session documentation</PlatformLink> for more information on user sessions.
52
52
53
53
See the subsections below to learn about the various ways the profiler can be started and stopped.
54
54
@@ -74,7 +74,7 @@ var tableView: UITableView!
74
74
DispatchQueue.main.async {
75
75
self.tableView.performBatchUpdates {
76
76
// update table view with model
77
-
} completion: { finished in
77
+
} completion: { finished in
78
78
SentrySDK.stopProfiler()
79
79
}
80
80
}
@@ -124,7 +124,7 @@ Check out the <PlatformLink to="/tracing/">tracing setup documentation</Platform
124
124
125
125
### App Starts
126
126
127
-
If configured with manual lifecycle, a profile starts on the next app launch, and continues until you call `SentrySDK.stopProfiler`.
127
+
If configured with manual lifecycle, a profile starts on the next app launch, and continues until you call `SentrySDK.stopProfiler`.
128
128
129
129
If configured with trace lifecycle, app start profiles are attached to a special performance transaction operation called `app.launch` and displayed in the product as `launch`. It is stopped either when `SentrySDK.startWithOptions` is called, or, if <PlatformLink to="/tracing/instrumentation/automatic-instrumentation/#time-to-initial-display">Time to Initial Display (TTID)</PlatformLink>/<PlatformLink to="/tracing/instrumentation/automatic-instrumentation/#time-to-full-display">Time to Full Display (TTFD)</PlatformLink> tracking is enabled, when the SDK determines that TTID/TTFD has been reached.
130
130
@@ -136,11 +136,11 @@ The SDK must have been started with a call to `SentrySDK.startWithOptions` in or
136
136
Every time `SentrySDK.startWithOptions` is called with app start profiling configured, a separate sample decision is generated with `sessionSampleRate` and stored until the next app launch (as well as `tracesSampleRate` if trace profile lifecycle is configured). The same sample decision will apply for the remainder of the profile session following that subsequent launch.
137
137
</Alert>
138
138
139
-
## Transaction-based Profiling (deprecated)
139
+
## Transaction-based Profiling (removed in 9.0.0)
140
140
141
141
<Alert>
142
142
143
-
Profiling configuration, explained below, was originally introduced in SDK version `8.12.0`. It is now deprecated in favor of UI Profiling, introduced in 8.49.0.
143
+
Transaction-based profiling configuration, explained below, was originally introduced in SDK version 8.12.0 and was removed in version 9.0.0. Use <PlatformLink to="/profiling/#enable-ui-profiling">UI Profiling</PlatformLink> instead, which was introduced in version 8.49.0.
144
144
145
145
</Alert>
146
146
@@ -172,11 +172,11 @@ SentrySDK.start { options in
172
172
}];
173
173
```
174
174
175
-
## Launch Profiling (deprecated)
175
+
## Launch Profiling (removed in 9.0.0)
176
176
177
177
<Alert>
178
178
179
-
Launch profiling configuration, explained below, was originally introduced in SDK version 8.21.0. It is now deprecated in favor of UI Profiling, released in 8.49.0.
179
+
Launch profiling configuration, explained below, was originally introduced in SDK version 8.21.0 and was removed in version 9.0.0. Use <PlatformLink to="/profiling/#enable-ui-profiling">UI Profiling</PlatformLink> instead, which was released in version 8.49.0.
180
180
181
181
</Alert>
182
182
@@ -210,11 +210,11 @@ SentrySDK.start { options in
210
210
}];
211
211
```
212
212
213
-
## Continuous Profiling Beta (deprecated)
213
+
## Continuous Profiling Beta (removed in 9.0.0)
214
214
215
215
<Alert>
216
216
217
-
Continuous Profiling Beta, explained below, was originally introduced in SDK version 8.36.0. It is now deprecated in favor of UI Profiling, released in 8.49.0.
217
+
Continuous Profiling Beta, explained below, was originally introduced in SDK version 8.36.0 and was removed in version 9.0.0. Use <PlatformLink to="/profiling/#enable-ui-profiling">UI Profiling</PlatformLink> instead, which was released in version 8.49.0.
0 commit comments