Skip to content

Commit 7dc7a8e

Browse files
committed
feat(V9): Make performance V2 the default in V9
1 parent af7a86c commit 7dc7a8e

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

Sources/Sentry/Public/SentryOptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ NS_SWIFT_NAME(Options)
287287
*/
288288
@property (nonatomic, assign) BOOL enableAutoPerformanceTracing;
289289

290+
#if !SDK_V9
290291
/**
291292
* We're working to update our Performance product offering in order to be able to provide better
292293
* insights and highlight specific actions you can take to improve your mobile app's overall
@@ -295,6 +296,7 @@ NS_SWIFT_NAME(Options)
295296
* UIWindowDidBecomeVisibleNotification. This change will be the default in the next major version.
296297
*/
297298
@property (nonatomic, assign) BOOL enablePerformanceV2;
299+
#endif // !SDK_V9
298300

299301
/**
300302
* @warning This is an experimental feature and may still have bugs.

Sources/Sentry/SentryAppStartTrackingIntegration.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ - (BOOL)installWithOptions:(SentryOptions *)options
2929
SentryAppStateManager *appStateManager =
3030
[SentryDependencyContainer sharedInstance].appStateManager;
3131

32+
# if SDK_V9
33+
BOOL usePerformanceV2 = YES;
34+
# else
35+
BOOL usePerformanceV2 = options.enablePerformanceV2;
36+
# endif // SDK_V9
3237
self.tracker = [[SentryAppStartTracker alloc]
3338
initWithDispatchQueueWrapper:[[SentryDispatchQueueWrapper alloc] init]
3439
appStateManager:appStateManager
3540
framesTracker:SentryDependencyContainer.sharedInstance.framesTracker
3641
enablePreWarmedAppStartTracing:options.enablePreWarmedAppStartTracing
37-
enablePerformanceV2:options.enablePerformanceV2];
42+
enablePerformanceV2:usePerformanceV2];
3843
[self.tracker start];
3944

4045
return YES;

Sources/Sentry/SentryOptions.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ - (instancetype)init
8888
self.maxAttachmentSize = 20 * 1024 * 1024;
8989
self.sendDefaultPii = NO;
9090
self.enableAutoPerformanceTracing = YES;
91+
#if !SDK_V9
9192
self.enablePerformanceV2 = NO;
93+
#endif // !SDK_V9
9294
self.enablePersistingTracesWhenCrashing = NO;
9395
self.enableCaptureFailedRequests = YES;
9496
self.environment = kSentryDefaultEnvironment;

Sources/Sentry/SentyOptionsInternal.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
240240
[self setBool:options[@"enableAutoPerformanceTracing"]
241241
block:^(BOOL value) { sentryOptions.enableAutoPerformanceTracing = value; }];
242242

243+
#if !SDK_V9
243244
[self setBool:options[@"enablePerformanceV2"]
244245
block:^(BOOL value) { sentryOptions.enablePerformanceV2 = value; }];
246+
#endif // !SDK_V9
245247

246248
[self setBool:options[@"enablePersistingTracesWhenCrashing"]
247249
block:^(BOOL value) { sentryOptions.enablePersistingTracesWhenCrashing = value; }];

Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ import Foundation
1515
features.append("captureFailedRequests")
1616
}
1717

18+
#if !SDK_V9
1819
if options.enablePerformanceV2 {
1920
features.append("performanceV2")
2021
}
22+
#endif // !SDK_V9
2123

2224
if options.enableTimeToFullDisplayTracing {
2325
features.append("timeToFullDisplayTracing")

0 commit comments

Comments
 (0)