Skip to content

Commit 5ecc901

Browse files
committed
Remove enable tracing flag from V9
1 parent 78af7a9 commit 5ecc901

File tree

9 files changed

+1
-598
lines changed

9 files changed

+1
-598
lines changed

CHANGELOG-v9.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Removes deprecated SentryDebugImageProvider class (#5598)
99
Makes app hang tracking V2 the default and removes the option to enable/disable it (#5615)
1010
Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
1111
Removes public SentrySerializable conformance from many public models (#5636, #5840, #5982)
12-
Removes enableTracing property from SentryOptions (#5694)
1312
Removes deprecated `setExtraValue` from SentrySpan (#5864)
1413
Removes `integrations` property from `SentryOptions` (#5749)
1514
Makes `SentryEventDecodable` internal (#5808)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Removes Decodable conformances from the public API of model classes (#5691)
88
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
99
- Removes `enablePerformanceV2` option and makes this the default. The app start duration will now finish when the first frame is drawn instead of when the OS posts the UIWindowDidBecomeVisibleNotification. (#6008)
10+
- Removes enableTracing property from SentryOptions (#5694)
1011

1112
### Features
1213

Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ public struct SentrySDKWrapper {
120120
options.enableWatchdogTerminationTracking = !isUITest && !isBenchmarking && !SentrySDKOverrides.Performance.disableWatchdogTracking.boolValue
121121

122122
options.enableAutoPerformanceTracing = !isBenchmarking && !SentrySDKOverrides.Performance.disablePerformanceTracing.boolValue
123-
#if !SDK_V9
124-
options.enableTracing = !isBenchmarking && !SentrySDKOverrides.Tracing.disableTracing.boolValue
125-
#endif // !SDK_V9
126123

127124
options.enableNetworkTracking = !SentrySDKOverrides.Networking.disablePerformanceTracking.boolValue
128125
options.enableCaptureFailedRequests = !SentrySDKOverrides.Networking.disableFailedRequestTracking.boolValue

Sources/Sentry/Profiling/SentryLaunchProfiling.m

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -162,47 +162,6 @@
162162
configuration:tracerConfig];
163163
}
164164

165-
# if !SDK_V9
166-
SentryLaunchProfileDecision
167-
sentry_launchShouldHaveTransactionProfiling(SentryOptions *options)
168-
{
169-
# pragma clang diagnostic push
170-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
171-
BOOL shouldProfileNextLaunch = options.enableAppLaunchProfiling && options.enableTracing;
172-
if (!shouldProfileNextLaunch) {
173-
SENTRY_LOG_DEBUG(@"Specified options configuration doesn't enable launch profiling: "
174-
@"options.enableAppLaunchProfiling: %d; options.enableTracing: %d; won't "
175-
@"profile launch",
176-
options.enableAppLaunchProfiling, options.enableTracing);
177-
return (SentryLaunchProfileDecision) { NO, nil, nil };
178-
}
179-
# pragma clang diagnostic pop
180-
181-
SentryTransactionContext *transactionContext =
182-
[[SentryTransactionContext alloc] initWithName:@"app.launch" operation:@"profile"];
183-
transactionContext.forNextAppLaunch = YES;
184-
SentrySamplingContext *context =
185-
[[SentrySamplingContext alloc] initWithTransactionContext:transactionContext];
186-
SentrySamplerDecision *tracesSamplerDecision = sentry_sampleTrace(context, options);
187-
if (tracesSamplerDecision.decision != kSentrySampleDecisionYes) {
188-
SENTRY_LOG_DEBUG(
189-
@"Sampling out the launch trace for transaction profiling; won't profile launch.");
190-
return (SentryLaunchProfileDecision) { NO, nil, nil };
191-
}
192-
193-
SentrySamplerDecision *profilesSamplerDecision
194-
= sentry_sampleTraceProfile(context, tracesSamplerDecision, options);
195-
if (profilesSamplerDecision.decision != kSentrySampleDecisionYes) {
196-
SENTRY_LOG_DEBUG(
197-
@"Sampling out the launch profile for transaction profiling; won't profile launch.");
198-
return (SentryLaunchProfileDecision) { NO, nil, nil };
199-
}
200-
201-
SENTRY_LOG_DEBUG(@"Will start transaction profile next launch; will profile launch.");
202-
return (SentryLaunchProfileDecision) { YES, tracesSamplerDecision, profilesSamplerDecision };
203-
}
204-
# endif // !SDK_V9
205-
206165
SentryLaunchProfileDecision
207166
sentry_launchShouldHaveContinuousProfilingV2(SentryOptions *options)
208167
{
@@ -264,19 +223,7 @@
264223
if ([options isContinuousProfilingV2Enabled]) {
265224
return sentry_launchShouldHaveContinuousProfilingV2(options);
266225
}
267-
# if SDK_V9
268226
return (SentryLaunchProfileDecision) { NO, nil, nil };
269-
# else
270-
271-
# pragma clang diagnostic push
272-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
273-
if ([options isContinuousProfilingEnabled]) {
274-
return (SentryLaunchProfileDecision) { options.enableAppLaunchProfiling, nil, nil };
275-
}
276-
# pragma clang diagnostic pop
277-
278-
return sentry_launchShouldHaveTransactionProfiling(options);
279-
# endif // SDK_V9
280227
}
281228

282229
/**

Sources/Sentry/Public/SentryOptions.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -407,17 +407,6 @@ NS_SWIFT_NAME(Options)
407407
*/
408408
@property (nonatomic, assign) BOOL enableFileIOTracing;
409409

410-
#if !SDK_V9
411-
/**
412-
* Indicates whether tracing should be enabled.
413-
* @discussion Enabling this sets @c tracesSampleRate to @c 1 if both @c tracesSampleRate and
414-
* @c tracesSampler are @c nil. Changing either @c tracesSampleRate or @c tracesSampler to a value
415-
* other then @c nil will enable this in case this was never changed before.
416-
*/
417-
@property (nonatomic)
418-
BOOL enableTracing DEPRECATED_MSG_ATTRIBUTE("Use tracesSampleRate or tracesSampler instead");
419-
#endif // !SDK_V9
420-
421410
/**
422411
* Indicates the percentage of the tracing data that is collected.
423412
* @discussion Specifying @c 0 or @c nil discards all trace data, @c 1.0 collects all trace data,

Sources/Sentry/SentryOptions.m

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
NSString *const kSentryDefaultEnvironment = @"production";
2525

2626
@implementation SentryOptions {
27-
#if !SDK_V9
28-
BOOL _enableTracingManual;
29-
#endif // !SDK_V9
3027
#if SWIFT_PACKAGE || SENTRY_TEST
3128
id _beforeSendLogDynamic;
3229
#endif // SWIFT_PACKAGE || SENTRY_TEST
@@ -95,10 +92,6 @@ - (instancetype)init
9592

9693
self.initialScope = ^SentryScope *(SentryScope *scope) { return scope; };
9794
__swiftExperimentalOptions = [[SentryExperimentalOptions alloc] init];
98-
#if !SDK_V9
99-
_enableTracing = NO;
100-
_enableTracingManual = NO;
101-
#endif // !SDK_V9
10295
#if SENTRY_HAS_UIKIT
10396
self.enableUIViewControllerTracing = YES;
10497
self.attachScreenshot = NO;
@@ -277,32 +270,12 @@ - (void)setSampleRate:(NSNumber *)sampleRate
277270
return rate >= 0 && rate <= 1.0;
278271
}
279272

280-
#if !SDK_V9
281-
- (void)setEnableTracing:(BOOL)enableTracing
282-
{
283-
//`enableTracing` is basically an alias to tracesSampleRate
284-
// by enabling it we set tracesSampleRate to maximum
285-
// if the user did not configured other ways to enable tracing
286-
if ((_enableTracing = enableTracing)) {
287-
if (_tracesSampleRate == nil && _tracesSampler == nil && _enableTracing) {
288-
_tracesSampleRate = @1;
289-
}
290-
}
291-
_enableTracingManual = YES;
292-
}
293-
#endif // !SDK_V9
294-
295273
- (void)setTracesSampleRate:(NSNumber *)tracesSampleRate
296274
{
297275
if (tracesSampleRate == nil) {
298276
_tracesSampleRate = nil;
299277
} else if (sentry_isValidSampleRate(tracesSampleRate)) {
300278
_tracesSampleRate = tracesSampleRate;
301-
#if !SDK_V9
302-
if (!_enableTracingManual) {
303-
_enableTracing = YES;
304-
}
305-
#endif // !SDK_V9
306279
} else {
307280
_tracesSampleRate = SENTRY_DEFAULT_TRACES_SAMPLE_RATE;
308281
}
@@ -311,23 +284,12 @@ - (void)setTracesSampleRate:(NSNumber *)tracesSampleRate
311284
- (void)setTracesSampler:(SentryTracesSamplerCallback)tracesSampler
312285
{
313286
_tracesSampler = tracesSampler;
314-
#if !SDK_V9
315-
if (_tracesSampler != nil && !_enableTracingManual) {
316-
_enableTracing = YES;
317-
}
318-
#endif // !SDK_V9
319287
}
320288

321289
- (BOOL)isTracingEnabled
322290
{
323-
#if SDK_V9
324291
return (_tracesSampleRate != nil && [_tracesSampleRate doubleValue] > 0)
325292
|| _tracesSampler != nil;
326-
#else
327-
return _enableTracing
328-
&& ((_tracesSampleRate != nil && [_tracesSampleRate doubleValue] > 0)
329-
|| _tracesSampler != nil);
330-
#endif // !SDK_V9
331293
}
332294

333295
#if SENTRY_TARGET_PROFILING_SUPPORTED

Sources/Sentry/SentyOptionsInternal.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,6 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
313313
if ([self isBlock:options[@"tracesSampler"]]) {
314314
sentryOptions.tracesSampler = options[@"tracesSampler"];
315315
}
316-
#if !SDK_V9
317-
# pragma clang diagnostic push
318-
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
319-
if ([options[@"enableTracing"] isKindOfClass:NSNumber.self]) {
320-
sentryOptions.enableTracing = [options[@"enableTracing"] boolValue];
321-
}
322-
# pragma clang diagnostic pop
323-
#endif // !SDK_V9
324316

325317
if ([options[@"inAppIncludes"] isKindOfClass:[NSArray class]]) {
326318
NSArray<NSString *> *inAppIncludes =

0 commit comments

Comments
 (0)