diff --git a/CHANGELOG-v9.md b/CHANGELOG-v9.md index 1de66a4bc5c..c917f89c01d 100644 --- a/CHANGELOG-v9.md +++ b/CHANGELOG-v9.md @@ -14,6 +14,7 @@ Removes Decodable conformances from the public API of model classes (#5691) Removes enableTracing property from SentryOptions (#5694) Removes `integrations` property from `SentryOptions` (#5749) Makes `SentryEventDecodable` internal (#5808) +The `span` property on `SentryScope` is now readonly (#5866) ### Fixes diff --git a/Sources/Sentry/Public/SentryScope.h b/Sources/Sentry/Public/SentryScope.h index e29fc2c7d72..b3515ed53c7 100644 --- a/Sources/Sentry/Public/SentryScope.h +++ b/Sources/Sentry/Public/SentryScope.h @@ -33,7 +33,11 @@ NS_SWIFT_NAME(Scope) * Returns current Span or Transaction. * @return current Span or Transaction or null if transaction has not been set. */ +#if SDK_V9 +@property (nullable, nonatomic, readonly, strong) id span; +#else @property (nullable, nonatomic, strong) id span; +#endif // SDK_V9 /** * The id of current session replay. diff --git a/Sources/Sentry/include/SentryScope+Private.h b/Sources/Sentry/include/SentryScope+Private.h index d4b2cf9ae65..1a0f6cabfb2 100644 --- a/Sources/Sentry/include/SentryScope+Private.h +++ b/Sources/Sentry/include/SentryScope+Private.h @@ -44,6 +44,8 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray *)breadcrumbs; +- (void)setSpan:(nullable id)span; + /** * used to add values in event context. */ diff --git a/sdk_api_V9.json b/sdk_api_V9.json index 7fd0ad5131f..2a551d01a48 100644 --- a/sdk_api_V9.json +++ b/sdk_api_V9.json @@ -22320,49 +22320,6 @@ "Dynamic" ], "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNameAlias", - "name": "Void", - "printedName": "Swift.Void", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ] - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "(any Sentry.Span)?", - "children": [ - { - "kind": "TypeNominal", - "name": "Span", - "printedName": "any Sentry.Span", - "usr": "c:objc(pl)SentrySpan" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "c:objc(cs)SentryScope(im)setSpan:", - "moduleName": "Sentry", - "isOpen": true, - "objc_name": "setSpan:", - "declAttributes": [ - "ObjC", - "Dynamic" - ], - "accessorKind": "set" } ] },