@@ -87,7 +87,7 @@ To capture all errors, initialize the SDK as soon as possible, such as in your `
8787
8888<PlatformSection notSupported = { [" apple.tvos" , " apple.watchos" , " apple.visionos" ]} >
8989
90- ``` swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
90+ ``` swift {tabTitle:Swift}
9191import Sentry
9292
9393func application (_ application : UIApplication,
@@ -101,21 +101,25 @@ func application(_ application: UIApplication,
101101 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
102102 options.sendDefaultPii = true
103103
104+ // ___PRODUCT_OPTION_START___ performance
104105 // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
105106 // We recommend adjusting this value in production.
106107 options.tracesSampleRate = 1
108+ // ___PRODUCT_OPTION_END___ performance
107109
110+ // ___PRODUCT_OPTION_START___ profiling
108111 options.configureProfiling = {
109112 $0 .lifecycle = .trace
110113 $0 .sessionSampleRate = 1
111114 }
115+ // ___PRODUCT_OPTION_END___ profiling
112116 }
113117
114118 return true
115119}
116120```
117121
118- ``` objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15", "profiling": "16-20"}}
122+ ``` objc {tabTitle:Objective-C}
119123@import Sentry;
120124
121125- (BOOL )application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -128,21 +132,25 @@ func application(_ application: UIApplication,
128132 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
129133 options .sendDefaultPii = YES
130134
135+ // ___PRODUCT_OPTION_START___ performance
131136 // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
132137 // We recommend adjusting this value in production.
133138 options .tracesSampleRate = @1.f ;
139+ // ___PRODUCT_OPTION_END___ performance
134140
141+ // ___PRODUCT_OPTION_START___ profiling
135142 options .configureProfiling = ^ (SentryProfileOptions * profiling ) {
136143 profiling.lifecycle = SentryProfileLifecycleTrace ;
137144 profiling.sessionSampleRate = 1.f ;
138145 };
146+ // ___PRODUCT_OPTION_END___ profiling
139147 } ] ;
140148
141149 return YES;
142150}
143151```
144152
145- ``` swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
153+ ``` swift {tabTitle:SwiftUI with App conformer}
146154import Sentry
147155
148156@main
@@ -156,14 +164,18 @@ struct SwiftUIApp: App {
156164 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
157165 options.sendDefaultPii = true
158166
167+ // ___PRODUCT_OPTION_START___ performance
159168 // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
160169 // We recommend adjusting this value in production.
161170 options.tracesSampleRate = 1
171+ // ___PRODUCT_OPTION_END___ performance
162172
173+ // ___PRODUCT_OPTION_START___ profiling
163174 options.configureProfiling = {
164175 $0 .lifecycle = .trace
165176 $0 .sessionSampleRate = 1
166177 }
178+ // ___PRODUCT_OPTION_END___ profiling
167179 }
168180 }
169181}
@@ -172,7 +184,7 @@ struct SwiftUIApp: App {
172184
173185<PlatformSection notSupported = { [" apple.ios" , " apple.macos" ]} >
174186
175- ``` swift {tabTitle:Swift} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
187+ ``` swift {tabTitle:Swift}
176188import Sentry
177189
178190func application (_ application : UIApplication,
@@ -186,21 +198,25 @@ func application(_ application: UIApplication,
186198 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
187199 options.sendDefaultPii = true
188200
201+ // ___PRODUCT_OPTION_START___ performance
189202 // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
190203 // We recommend adjusting this value in production.
191204 options.tracesSampleRate = 1
205+ // ___PRODUCT_OPTION_END___ performance
192206
207+ // ___PRODUCT_OPTION_START___ profiling
193208 options.configureProfiling = {
194209 $0 .lifecycle = .trace
195210 $0 .sessionSampleRate = 1
196211 }
212+ // ___PRODUCT_OPTION_END___ profiling
197213 }
198214
199215 return true
200216}
201217```
202218
203- ``` objc {tabTitle:Objective-C} {"onboardingOptions": {"performance": "12-15", "profiling": "16-20"}}
219+ ``` objc {tabTitle:Objective-C}
204220@import Sentry;
205221
206222- (BOOL )application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
@@ -213,21 +229,25 @@ func application(_ application: UIApplication,
213229 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
214230 options .sendDefaultPii = YES
215231
232+ // ___PRODUCT_OPTION_START___ performance
216233 // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
217234 // We recommend adjusting this value in production.
218235 options .tracesSampleRate = @1.f ;
236+ // ___PRODUCT_OPTION_END___ performance
219237
238+ // ___PRODUCT_OPTION_START___ profiling
220239 options .configureProfiling = ^ (SentryProfileOptions * profiling ) {
221240 profiling.lifecycle = SentryProfileLifecycleTrace ;
222241 profiling.sessionSampleRate = 1.f ;
223242 };
243+ // ___PRODUCT_OPTION_END___ profiling
224244 } ] ;
225245
226246 return YES;
227247}
228248```
229249
230- ``` swift {tabTitle:SwiftUI with App conformer} {"onboardingOptions": {"performance": "13-16", "profiling": "17-21"}}
250+ ``` swift {tabTitle:SwiftUI with App conformer}
231251import Sentry
232252
233253@main
@@ -241,14 +261,18 @@ struct SwiftUIApp: App {
241261 // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
242262 options.sendDefaultPii = true
243263
264+ // ___PRODUCT_OPTION_START___ performance
244265 // Set tracesSampleRate to 1 to capture 100% of transactions for performance monitoring.
245266 // We recommend adjusting this value in production.
246267 options.tracesSampleRate = 1
268+ // ___PRODUCT_OPTION_END___ performance
247269
270+ // ___PRODUCT_OPTION_START___ profiling
248271 options.configureProfiling = {
249272 $0 .lifecycle = .trace
250273 $0 .sessionSampleRate = 1
251274 }
275+ // ___PRODUCT_OPTION_END___ profiling
252276 }
253277 }
254278}
0 commit comments