Skip to content

Commit 7de2e2d

Browse files
committed
chore: Remove v2 perf option from v9 sdk
1 parent 06a9389 commit 7de2e2d

File tree

14 files changed

+16
-106
lines changed

14 files changed

+16
-106
lines changed

Samples/SentrySampleShared/SentrySampleShared/SentrySDKOverrides.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public enum SentrySDKOverrides: String, CaseIterable {
8383

8484
public enum Performance: String, SentrySDKOverride {
8585
case disableTimeToFullDisplayTracing = "--io.sentry.performance.disable-time-to-full-display-tracing"
86-
case disablePerformanceV2 = "--io.sentry.performance.disable-performance-v2"
8786
case disableAppHangTrackingV2 = "--io.sentry.performance.disable-app-hang-tracking-v2"
8887
case disableSessionTracking = "--io.sentry.performance.disable-automatic-session-tracking"
8988
case disableFileIOTracing = "--io.sentry.performance.disable-file-io-tracing"
@@ -315,7 +314,7 @@ extension SentrySDKOverrides.Other {
315314
extension SentrySDKOverrides.Performance {
316315
public var overrideType: OverrideType {
317316
switch self {
318-
case .disableTimeToFullDisplayTracing, .disablePerformanceV2, .disableAppHangTrackingV2, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return .boolean
317+
case .disableTimeToFullDisplayTracing, .disableAppHangTrackingV2, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return .boolean
319318
case .sessionTrackingIntervalMillis: return .string
320319
}
321320
}
@@ -402,7 +401,7 @@ extension SentrySDKOverrides.Other {
402401
extension SentrySDKOverrides.Performance {
403402
public var ignoresDisableEverything: Bool {
404403
switch self {
405-
case .disableTimeToFullDisplayTracing, .disablePerformanceV2, .disableAppHangTrackingV2, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return false
404+
case .disableTimeToFullDisplayTracing, .disableAppHangTrackingV2, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return false
406405
case .sessionTrackingIntervalMillis: return true
407406
}
408407
}

Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ public struct SentrySDKWrapper {
135135
options.enableCrashHandler = !SentrySDKOverrides.Other.disableCrashHandling.boolValue
136136
options.enablePersistingTracesWhenCrashing = true
137137
options.enableTimeToFullDisplayTracing = !SentrySDKOverrides.Performance.disableTimeToFullDisplayTracing.boolValue
138-
#if !SDK_V9
139-
options.enablePerformanceV2 = !SentrySDKOverrides.Performance.disablePerformanceV2.boolValue
140-
#endif
141138
options.failedRequestStatusCodes = [ HttpStatusCodeRange(min: 400, max: 599) ]
142139

143140
#if targetEnvironment(simulator)

Sources/Sentry/Public/SentryOptions.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,6 @@ NS_SWIFT_NAME(Options)
288288
*/
289289
@property (nonatomic, assign) BOOL enableAutoPerformanceTracing;
290290

291-
#if !SDK_V9
292-
/**
293-
* We're working to update our Performance product offering in order to be able to provide better
294-
* insights and highlight specific actions you can take to improve your mobile app's overall
295-
* performance. The performanceV2 option changes the following behavior: The app start duration will
296-
* now finish when the first frame is drawn instead of when the OS posts the
297-
* UIWindowDidBecomeVisibleNotification. This change will be the default in the next major version.
298-
*/
299-
@property (nonatomic, assign) BOOL enablePerformanceV2;
300-
#endif // !SDK_V9
301-
302291
/**
303292
* @warning This is an experimental feature and may still have bugs.
304293
*

Sources/Sentry/SentryAppStartTracker.m

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ @interface SentryAppStartTracker () <SentryFramesTrackerListener>
3333
@property (nonatomic, assign) BOOL wasInBackground;
3434
@property (nonatomic, strong) NSDate *didFinishLaunchingTimestamp;
3535
@property (nonatomic, assign) BOOL enablePreWarmedAppStartTracing;
36-
@property (nonatomic, assign) BOOL enablePerformanceV2;
3736

3837
@end
3938

@@ -55,16 +54,12 @@ - (instancetype)initWithDispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispa
5554
appStateManager:(id<SentryAppStateManager>)appStateManager
5655
framesTracker:(SentryFramesTracker *)framesTracker
5756
enablePreWarmedAppStartTracing:(BOOL)enablePreWarmedAppStartTracing
58-
enablePerformanceV2:(BOOL)enablePerformanceV2
5957
{
6058
if (self = [super init]) {
6159
self.dispatchQueue = dispatchQueueWrapper;
6260
self.appStateManager = appStateManager;
63-
_enablePerformanceV2 = enablePerformanceV2;
64-
if (_enablePerformanceV2) {
65-
self.framesTracker = framesTracker;
66-
[framesTracker addListener:self];
67-
}
61+
self.framesTracker = framesTracker;
62+
[framesTracker addListener:self];
6863

6964
self.previousAppState = [self.appStateManager loadPreviousAppState];
7065
self.wasInBackground = NO;
@@ -104,11 +99,6 @@ - (void)start
10499
name:UIApplicationDidFinishLaunchingNotification
105100
object:nil];
106101

107-
[NSNotificationCenter.defaultCenter addObserver:self
108-
selector:@selector(didBecomeVisible)
109-
name:UIWindowDidBecomeVisibleNotification
110-
object:nil];
111-
112102
[NSNotificationCenter.defaultCenter addObserver:self
113103
selector:@selector(didEnterBackground)
114104
name:UIApplicationDidEnterBackgroundNotification
@@ -229,19 +219,6 @@ - (void)buildAppStartMeasurement:(NSDate *)appStartEnd
229219
# endif // defined(SENTRY_TEST) || defined(SENTRY_TEST_CI) || defined(DEBUG)
230220
}
231221

232-
/**
233-
* This is when the window becomes visible, which is not when the first frame of the app is drawn.
234-
* When this is posted, the app screen is usually white. The correct time when the first frame is
235-
* drawn is called in framesTrackerHasNewFrame only when `enablePerformanceV2` is enabled.
236-
*/
237-
- (void)didBecomeVisible
238-
{
239-
if (!_enablePerformanceV2) {
240-
[self
241-
buildAppStartMeasurement:[SentryDependencyContainer.sharedInstance.dateProvider date]];
242-
}
243-
}
244-
245222
/**
246223
* This is when the first frame is drawn.
247224
*/
@@ -303,10 +280,6 @@ - (void)stop
303280
name:UIApplicationDidFinishLaunchingNotification
304281
object:nil];
305282

306-
[NSNotificationCenter.defaultCenter removeObserver:self
307-
name:UIWindowDidBecomeVisibleNotification
308-
object:nil];
309-
310283
[NSNotificationCenter.defaultCenter removeObserver:self
311284
name:UIApplicationDidEnterBackgroundNotification
312285
object:nil];

Sources/Sentry/SentryAppStartTrackingIntegration.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,11 @@ - (BOOL)installWithOptions:(SentryOptions *)options
2727
id<SentryAppStateManager> appStateManager =
2828
[SentryDependencyContainer sharedInstance].appStateManager;
2929

30-
# if SDK_V9
31-
BOOL usePerformanceV2 = YES;
32-
# else
33-
BOOL usePerformanceV2 = options.enablePerformanceV2;
34-
# endif // SDK_V9
3530
self.tracker = [[SentryAppStartTracker alloc]
3631
initWithDispatchQueueWrapper:[[SentryDispatchQueueWrapper alloc] init]
3732
appStateManager:appStateManager
3833
framesTracker:SentryDependencyContainer.sharedInstance.framesTracker
39-
enablePreWarmedAppStartTracing:options.enablePreWarmedAppStartTracing
40-
enablePerformanceV2:usePerformanceV2];
34+
enablePreWarmedAppStartTracing:options.enablePreWarmedAppStartTracing];
4135
[self.tracker start];
4236

4337
return YES;

Sources/Sentry/SentryOptions.m

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

Sources/Sentry/SentyOptionsInternal.m

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

243-
#if !SDK_V9
244-
[self setBool:options[@"enablePerformanceV2"]
245-
block:^(BOOL value) { sentryOptions.enablePerformanceV2 = value; }];
246-
#endif // !SDK_V9
247-
248243
[self setBool:options[@"enablePersistingTracesWhenCrashing"]
249244
block:^(BOOL value) { sentryOptions.enablePersistingTracesWhenCrashing = value; }];
250245

Sources/Sentry/include/SentryAppStartTracker.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ SENTRY_NO_INIT
2222
- (instancetype)initWithDispatchQueueWrapper:(SentryDispatchQueueWrapper *)dispatchQueueWrapper
2323
appStateManager:(id<SentryAppStateManager>)appStateManager
2424
framesTracker:(SentryFramesTracker *)framesTracker
25-
enablePreWarmedAppStartTracing:(BOOL)enablePreWarmedAppStartTracing
26-
enablePerformanceV2:(BOOL)enablePerformanceV2;
25+
enablePreWarmedAppStartTracing:(BOOL)enablePreWarmedAppStartTracing;
2726

2827
- (void)start;
2928
- (void)stop;

Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

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

18-
#if !SDK_V9
19-
if options.enablePerformanceV2 {
20-
features.append("performanceV2")
21-
}
22-
#endif // !SDK_V9
23-
2418
if options.enableTimeToFullDisplayTracing {
2519
features.append("timeToFullDisplayTracing")
2620
}

Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase {
2222
func testEnableAllFeatures() throws {
2323
// -- Arrange --
2424
let options = Options()
25-
options.enablePerformanceV2 = true
2625
options.enableTimeToFullDisplayTracing = true
2726
options.swiftAsyncStacktraces = true
2827

0 commit comments

Comments
 (0)