Skip to content

Commit ec3fc3a

Browse files
authored
ref: Remove deprecated app start option (#6460)
1 parent e43ed75 commit ec3fc3a

File tree

9 files changed

+96
-210
lines changed

9 files changed

+96
-210
lines changed

Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ extension SentrySDKWrapper {
481481
return NSNumber(value: samplerValue)
482482
}
483483
}
484-
options.enableAppLaunchProfiling = !SentrySDKOverrides.Profiling.disableAppStartProfiling.boolValue
485484
#endif // !SDK_V9
486485

487486
if !SentrySDKOverrides.Profiling.disableUIProfiling.boolValue {

Samples/iOS-ObjectiveC/iOS-ObjectiveC/AppDelegate.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ - (BOOL)application:(UIApplication *)application
6868
{
6969
return @([env[@"--io.sentry.profilesSamplerValue"] floatValue]);
7070
};
71-
# pragma clang diagnostic pop
72-
}
73-
74-
if (![args containsObject:@"--io.sentry.profiling.disable-app-start-profiling"]) {
75-
# pragma clang diagnostic push
76-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
77-
options.enableAppLaunchProfiling = YES;
7871
# pragma clang diagnostic pop
7972
}
8073
#endif // !SDK_V9

Samples/iOS-Swift/iOS-Swift/Profiling/ProfilingViewController.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,7 @@ private extension ProfilingViewController {
197197
profileAppStartsSwitch.isOn = v2Options.profileAppStarts
198198
} else {
199199
traceLifecycleSwitch.isOn = false
200-
#if SDK_V9
201200
profileAppStartsSwitch.isOn = false
202-
#else
203-
profileAppStartsSwitch.isOn = options.enableAppLaunchProfiling
204-
#endif // !SDK_V9
205201
}
206202
}
207203

Sources/Sentry/Public/SentryOptions.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -538,22 +538,6 @@ typedef void (^SentryProfilingConfigurationBlock)(SentryProfileOptions *_Nonnull
538538
@property (nullable, nonatomic, copy) SentryProfilingConfigurationBlock configureProfiling;
539539

540540
# if !SDK_V9
541-
/**
542-
* @warning This is an experimental feature and may still have bugs.
543-
* Set to @c YES to run the profiler as early as possible in an app launch, before you would
544-
* normally have the opportunity to call @c SentrySDK.start . If @c profilesSampleRate is nonnull,
545-
* the @c tracesSampleRate and @c profilesSampleRate are persisted to disk and read on the next app
546-
* launch to decide whether to profile that launch.
547-
* @warning If @c profilesSampleRate is @c nil then a continuous profile will be started on every
548-
* launch; if you desire sampling profiled launches, you must compute your own sample rate to decide
549-
* whether to set this property to @c YES or @c NO .
550-
* @warning This property is deprecated and will be removed in a future version of the SDK. See
551-
* @c SentryProfileOptions.startOnAppStart and @c SentryProfileOptions.lifecycle .
552-
* @note Profiling is automatically disabled if a thread sanitizer is attached.
553-
*/
554-
@property (nonatomic, assign) BOOL enableAppLaunchProfiling DEPRECATED_MSG_ATTRIBUTE(
555-
"This property is deprecated and will be removed in a future version of the SDK. See "
556-
"SentryProfileOptions.startOnAppStart and SentryProfileOptions.lifecycle");
557541

558542
/**
559543
* @note Profiling is not supported on watchOS or tvOS.

Sources/Sentry/SentyOptionsInternal.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
373373
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
374374
[self setBool:options[@"enableProfiling"]
375375
block:^(BOOL value) { sentryOptions.enableProfiling = value; }];
376-
377-
[self setBool:options[NSStringFromSelector(@selector(enableAppLaunchProfiling))]
378-
block:^(BOOL value) { sentryOptions.enableAppLaunchProfiling = value; }];
379376
# pragma clang diagnostic pop
380377
# endif // !SDK_V9
381378
#endif // SENTRY_TARGET_PROFILING_SUPPORTED

Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ import Foundation
1919
features.append("timeToFullDisplayTracing")
2020
}
2121

22-
#if os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
23-
#if !SDK_V9
24-
if options.enableAppLaunchProfiling {
25-
features.append("appLaunchProfiling")
26-
}
27-
#endif // !SDK_V9
28-
#endif // os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
29-
3022
#if os(iOS) || os(tvOS)
3123
#if canImport(UIKit) && !SENTRY_NO_UIKIT
3224
if options.enablePreWarmedAppStartTracing {

Tests/SentryProfilerTests/SentryAppStartProfilingConfigurationTests.swift

Lines changed: 96 additions & 152 deletions
Large diffs are not rendered by default.

Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase {
2525
options.enableTimeToFullDisplayTracing = true
2626
options.swiftAsyncStacktraces = true
2727

28-
#if os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
29-
options.enableAppLaunchProfiling = true
30-
#endif // os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
31-
3228
#if os(iOS) || os(tvOS)
3329
#if canImport(UIKit) && !SENTRY_NO_UIKIT
3430
options.enablePreWarmedAppStartTracing = true
@@ -47,10 +43,6 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase {
4743
XCTAssert(features.contains("timeToFullDisplayTracing"))
4844
XCTAssert(features.contains("swiftAsyncStacktraces"))
4945

50-
#if os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
51-
XCTAssert(features.contains("appLaunchProfiling"))
52-
#endif // os(iOS) || os(macOS) || targetEnvironment(macCatalyst)
53-
5446
#if os(iOS) || os(tvOS)
5547
#if canImport(UIKit) && !SENTRY_NO_UIKIT
5648
XCTAssert(features.contains("preWarmedAppStartTracing"))

Tests/SentryTests/SentryOptionsTest.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,17 +1397,6 @@ - (void)testInitialScope
13971397
XCTAssertIdentical(initialScope, options.initialScope);
13981398
}
13991399

1400-
#if SENTRY_TARGET_PROFILING_SUPPORTED
1401-
# pragma clang diagnostic push
1402-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
1403-
- (void)testEnableAppLaunchProfilingDefaultValue
1404-
{
1405-
SentryOptions *options = [self getValidOptions:@{}];
1406-
XCTAssertFalse(options.enableAppLaunchProfiling);
1407-
}
1408-
# pragma clang diagnostic pop
1409-
#endif // SENTRY_TARGET_PROFILING_SUPPORTED
1410-
14111400
- (SentryOptions *)getValidOptions:(NSDictionary<NSString *, id> *)dict
14121401
{
14131402
NSError *error = nil;

0 commit comments

Comments
 (0)