Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Removes deprecated getStoreEndpoint (#5591)
Removes deprecated useSpan function (#5591)
Removes deprecated SentryDebugImageProvider class (#5598)
Makes app hang tracking V2 the default and removes the option to enable/disable it (#5615)
Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
Removes public SentrySerializable conformance from many public models (#5636, #5840, #5982)
Removes enableTracing property from SentryOptions (#5694)
Removes deprecated `setExtraValue` from SentrySpan (#5864)
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
### Breaking Changes

- Removes Decodable conformances from the public API of model classes (#5691)
- Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
- Removes deprecated TraceContext initializers (#6348)
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
- 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)

Expand Down
13 changes: 0 additions & 13 deletions Sources/Sentry/Public/SentryBaggage.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ NS_SWIFT_NAME(Baggage)
*/
@property (nullable, nonatomic, readonly) NSString *userId;

/**
* The value of a segment attribute in the user's data bag, if it exists.
*/
#if !SDK_V9
@property (nullable, nonatomic, readonly) NSString *userSegment;
#endif

/**
* The random value used to determine if the trace is sampled.
*
Expand All @@ -71,9 +64,6 @@ NS_SWIFT_NAME(Baggage)
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampled:(nullable NSString *)sampled
replayId:(nullable NSString *)replayId;
Expand All @@ -83,9 +73,6 @@ NS_SWIFT_NAME(Baggage)
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampleRand:(nullable NSString *)sampleRand
sampled:(nullable NSString *)sampled
Expand Down
27 changes: 0 additions & 27 deletions Sources/Sentry/Public/SentryTraceContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ NS_SWIFT_NAME(TraceContext)
*/
@property (nullable, nonatomic, readonly) NSString *transaction;

/**
* A subset of the scope's user context.
*/
#if !SDK_V9
@property (nullable, nonatomic, readonly) NSString *userSegment;
#endif

/**
* Serialized sample rate used for this trace.
*/
Expand Down Expand Up @@ -85,9 +78,6 @@ NS_SWIFT_NAME(TraceContext)
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampled:(nullable NSString *)sampled
replayId:(nullable NSString *)replayId;
Expand All @@ -100,9 +90,6 @@ NS_SWIFT_NAME(TraceContext)
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampleRand:(nullable NSString *)sampleRand
sampled:(nullable NSString *)sampled
Expand All @@ -125,29 +112,15 @@ NS_SWIFT_NAME(TraceContext)
scope:(nullable SentryScope *)scope
options:(SentryOptions *)options;

#if SDK_V9
/**
* Initializes a SentryTraceContext with data from a traceId, options and replayId.
*
* @param traceId The current tracer.
* @param options The current active options.
* @param replayId The current session replay.
*/
#else
/**
* Initializes a SentryTraceContext with data from a traceId, options, userSegment and replayId.
*
* @param traceId The current tracer.
* @param options The current active options.
* @param userSegment You can retrieve this usually from the `scope.userObject.segment`.
* @param replayId The current session replay.
*/
#endif
- (instancetype)initWithTraceId:(SentryId *)traceId
options:(SentryOptions *)options
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
replayId:(nullable NSString *)replayId;

/**
Expand Down
28 changes: 0 additions & 28 deletions Sources/Sentry/Public/SentryTransactionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ SENTRY_NO_INIT
*/
- (instancetype)initWithName:(NSString *)name operation:(NSString *)operation;

/**
* @param name Transaction name
* @param operation The operation this span is measuring.
* @param sampled Determines whether the trace should be sampled.
*/
- (instancetype)initWithName:(NSString *)name
operation:(NSString *)operation
sampled:(SentrySampleDecision)sampled
DEPRECATED_MSG_ATTRIBUTE("Use initWithName:operation:sampled:sampleRate:sampleRand instead");

/**
* @param name Transaction name
* @param operation The operation this span is measuring.
Expand All @@ -85,24 +75,6 @@ SENTRY_NO_INIT
sampleRate:(nullable NSNumber *)sampleRate
sampleRand:(nullable NSNumber *)sampleRand;

/**
* @param name Transaction name
* @param operation The operation this span is measuring.
* @param traceId Trace Id
* @param spanId Span Id
* @param parentSpanId Parent span id
* @param parentSampled Whether the parent is sampled
*/
- (instancetype)initWithName:(NSString *)name
operation:(NSString *)operation
traceId:(SentryId *)traceId
spanId:(SentrySpanId *)spanId
parentSpanId:(nullable SentrySpanId *)parentSpanId
parentSampled:(SentrySampleDecision)parentSampled
DEPRECATED_MSG_ATTRIBUTE("Use "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h: We should create a migration guide with the note what to use instead. Either an migration.md or a page in sentry-docs

"initWithName:operation:traceId:spanId:parentSpanId:parentSampled:"
"parentSampleRate:parentSampleRand instead");

/**
* @param name Transaction name
* @param operation The operation this span is measuring.
Expand Down
9 changes: 0 additions & 9 deletions Sources/Sentry/Public/SentryUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ NS_SWIFT_NAME(User)
*/
@property (atomic, copy) NSString *_Nullable ipAddress;

#if !SDK_V9
/**
* The user segment, for apps that divide users in user segments.
* @deprecated This field will be removed in the next major version.
*/
@property (atomic, copy) NSString *_Nullable segment DEPRECATED_MSG_ATTRIBUTE(
"This field is deprecated and will be removed in the next major update.");
#endif // !SDK_V9

/**
* Optional: Human readable name
*/
Expand Down
18 changes: 0 additions & 18 deletions Sources/Sentry/SentryBaggage.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ - (instancetype)initWithTraceId:(SentryId *)traceId
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampled:(nullable NSString *)sampled
replayId:(nullable NSString *)replayId
Expand All @@ -27,9 +24,6 @@ - (instancetype)initWithTraceId:(SentryId *)traceId
releaseName:releaseName
environment:environment
transaction:transaction
#if !SDK_V9
userSegment:userSegment
#endif
sampleRate:sampleRate
sampleRand:nil
sampled:sampled
Expand All @@ -41,9 +35,6 @@ - (instancetype)initWithTraceId:(SentryId *)traceId
releaseName:(nullable NSString *)releaseName
environment:(nullable NSString *)environment
transaction:(nullable NSString *)transaction
#if !SDK_V9
userSegment:(nullable NSString *)userSegment
#endif
sampleRate:(nullable NSString *)sampleRate
sampleRand:(nullable NSString *)sampleRand
sampled:(nullable NSString *)sampled
Expand All @@ -56,9 +47,6 @@ - (instancetype)initWithTraceId:(SentryId *)traceId
_releaseName = releaseName;
_environment = environment;
_transaction = transaction;
#if !SDK_V9
_userSegment = userSegment;
#endif
_sampleRate = sampleRate;
_sampleRand = sampleRand;
_sampled = sampled;
Expand Down Expand Up @@ -88,12 +76,6 @@ - (NSString *)toHTTPHeaderWithOriginalBaggage:(NSDictionary *_Nullable)originalB
[information setValue:_transaction forKey:@"sentry-transaction"];
}

#if !SDK_V9
if (_userSegment != nil) {
[information setValue:_userSegment forKey:@"sentry-user_segment"];
}
#endif

if (_sampleRand != nil) {
[information setValue:_sampleRand forKey:@"sentry-sample_rand"];
}
Expand Down
10 changes: 0 additions & 10 deletions Sources/Sentry/SentryClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,8 @@ - (nullable SentryTraceContext *)getTraceStateWithEvent:(SentryEvent *)event
}

if (event.error || event.exceptions.count > 0) {
#if !SDK_V9
NSString *segment = nil;
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
segment = scope.userObject.segment;
# pragma clang diagnostic pop
#endif
return [[SentryTraceContext alloc] initWithTraceId:scope.propagationContext.traceId
options:self.options
#if !SDK_V9
userSegment:segment
#endif
replayId:scope.replayId];
}

Expand Down
11 changes: 0 additions & 11 deletions Sources/Sentry/SentryNetworkTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
- (BOOL)sessionTaskRequiresPropagation:(NSURLSessionTask *)sessionTask
{
return sessionTask.currentRequest != nil &&
[self isTargetMatch:sessionTask.currentRequest.URL

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / watchos

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / xros

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, staticlib, sentry-static) / watchos

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / appletvos

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -Dynamic, sentry-dynamic) / watchos

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]

Check warning on line 135 in Sources/Sentry/SentryNetworkTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / watchos

implicit conversion from nullable pointer 'NSURL * _Nullable' to non-nullable pointer type 'NSURL * _Nonnull' [-Wnullable-to-nonnull-conversion]
withTargets:SentrySDKInternal.options.tracePropagationTargets];
}

Expand Down Expand Up @@ -233,20 +233,9 @@
SentryPropagationContext *propagationContext
= SentrySDKInternal.currentHub.scope.propagationContext;

#if !SDK_V9
NSString *segment = nil;
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
segment = SentrySDKInternal.currentHub.scope.userObject.segment;
# pragma clang diagnostic pop
#endif

SentryTraceContext *traceContext =
[[SentryTraceContext alloc] initWithTraceId:propagationContext.traceId
options:SentrySDKInternal.currentHub.client.options
#if !SDK_V9
userSegment:segment
#endif
replayId:SentrySDKInternal.currentHub.scope.replayId];

[self addBaggageHeader:[traceContext toBaggage]
Expand Down
Loading
Loading