@@ -87,7 +87,7 @@ To capture all errors, initialize the SDK as soon as possible, such as in your `
87
87
88
88
<PlatformSection notSupported = { [" apple.tvos" , " apple.watchos" , " apple.visionos" ]} >
89
89
90
- ``` swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
90
+ ``` swift {tabTitle:Swift}
91
91
import Sentry
92
92
93
93
func application (_ application : UIApplication,
@@ -101,21 +101,25 @@ func application(_ application: UIApplication,
101
101
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
102
102
options.sendDefaultPii = true
103
103
104
+ // ___PRODUCT_OPTION_START___ performance
104
105
// Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
105
106
// We recommend adjusting this value in production.
106
107
options.tracesSampleRate = 1
108
+ // ___PRODUCT_OPTION_END___ performance
107
109
110
+ // ___PRODUCT_OPTION_START___ profiling
108
111
options.configureProfiling = {
109
112
$0 .lifecycle = .trace
110
113
$0 .sessionSampleRate = 1
111
114
}
115
+ // ___PRODUCT_OPTION_END___ profiling
112
116
}
113
117
114
118
return true
115
119
}
116
120
```
117
121
118
- ``` objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15", "profiling": "16-20"}}
122
+ ``` objc {tabTitle:Objective-C}
119
123
@import Sentry;
120
124
121
125
- (BOOL )application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -128,21 +132,25 @@ func application(_ application: UIApplication,
128
132
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
129
133
options .sendDefaultPii = YES
130
134
135
+ // ___PRODUCT_OPTION_START___ performance
131
136
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
132
137
// We recommend adjusting this value in production.
133
138
options .tracesSampleRate = @1.f ;
139
+ // ___PRODUCT_OPTION_END___ performance
134
140
141
+ // ___PRODUCT_OPTION_START___ profiling
135
142
options .configureProfiling = ^ (SentryProfileOptions * profiling ) {
136
143
profiling.lifecycle = SentryProfileLifecycleTrace ;
137
144
profiling.sessionSampleRate = 1.f ;
138
145
};
146
+ // ___PRODUCT_OPTION_END___ profiling
139
147
} ] ;
140
148
141
149
return YES;
142
150
}
143
151
```
144
152
145
- ``` swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
153
+ ``` swift {tabTitle:SwiftUI with App conformer}
146
154
import Sentry
147
155
148
156
@main
@@ -156,14 +164,18 @@ struct SwiftUIApp: App {
156
164
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
157
165
options.sendDefaultPii = true
158
166
167
+ // ___PRODUCT_OPTION_START___ performance
159
168
// Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
160
169
// We recommend adjusting this value in production.
161
170
options.tracesSampleRate = 1
171
+ // ___PRODUCT_OPTION_END___ performance
162
172
173
+ // ___PRODUCT_OPTION_START___ profiling
163
174
options.configureProfiling = {
164
175
$0 .lifecycle = .trace
165
176
$0 .sessionSampleRate = 1
166
177
}
178
+ // ___PRODUCT_OPTION_END___ profiling
167
179
}
168
180
}
169
181
}
@@ -172,7 +184,7 @@ struct SwiftUIApp: App {
172
184
173
185
<PlatformSection notSupported = { [" apple.ios" , " apple.macos" ]} >
174
186
175
- ``` swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
187
+ ``` swift {tabTitle:Swift}
176
188
import Sentry
177
189
178
190
func application (_ application : UIApplication,
@@ -186,21 +198,25 @@ func application(_ application: UIApplication,
186
198
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
187
199
options.sendDefaultPii = true
188
200
201
+ // ___PRODUCT_OPTION_START___ performance
189
202
// Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
190
203
// We recommend adjusting this value in production.
191
204
options.tracesSampleRate = 1
205
+ // ___PRODUCT_OPTION_END___ performance
192
206
207
+ // ___PRODUCT_OPTION_START___ profiling
193
208
options.configureProfiling = {
194
209
$0 .lifecycle = .trace
195
210
$0 .sessionSampleRate = 1
196
211
}
212
+ // ___PRODUCT_OPTION_END___ profiling
197
213
}
198
214
199
215
return true
200
216
}
201
217
```
202
218
203
- ``` objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15", "profiling": "16-20"}}
219
+ ``` objc {tabTitle:Objective-C}
204
220
@import Sentry;
205
221
206
222
- (BOOL )application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -213,21 +229,25 @@ func application(_ application: UIApplication,
213
229
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
214
230
options .sendDefaultPii = YES
215
231
232
+ // ___PRODUCT_OPTION_START___ performance
216
233
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
217
234
// We recommend adjusting this value in production.
218
235
options .tracesSampleRate = @1.f ;
236
+ // ___PRODUCT_OPTION_END___ performance
219
237
238
+ // ___PRODUCT_OPTION_START___ profiling
220
239
options .configureProfiling = ^ (SentryProfileOptions * profiling ) {
221
240
profiling.lifecycle = SentryProfileLifecycleTrace ;
222
241
profiling.sessionSampleRate = 1.f ;
223
242
};
243
+ // ___PRODUCT_OPTION_END___ profiling
224
244
} ] ;
225
245
226
246
return YES;
227
247
}
228
248
```
229
249
230
- ``` swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
250
+ ``` swift {tabTitle:SwiftUI with App conformer}
231
251
import Sentry
232
252
233
253
@main
@@ -241,14 +261,18 @@ struct SwiftUIApp: App {
241
261
// For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
242
262
options.sendDefaultPii = true
243
263
264
+ // ___PRODUCT_OPTION_START___ performance
244
265
// Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
245
266
// We recommend adjusting this value in production.
246
267
options.tracesSampleRate = 1
268
+ // ___PRODUCT_OPTION_END___ performance
247
269
270
+ // ___PRODUCT_OPTION_START___ profiling
248
271
options.configureProfiling = {
249
272
$0 .lifecycle = .trace
250
273
$0 .sessionSampleRate = 1
251
274
}
275
+ // ___PRODUCT_OPTION_END___ profiling
252
276
}
253
277
}
254
278
}
0 commit comments