diff --git a/CHANGELOG.md b/CHANGELOG.md index dc53197421a..3908195fc8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Features - Structured Logs: Flush logs on SDK flush/close (#5834) +- Add source context and vars fields to SentryFrame (#5853) ## 8.54.1-alpha.1 diff --git a/Sources/Sentry/Public/SentryFrame.h b/Sources/Sentry/Public/SentryFrame.h index 64f8ee0d2b5..c459239bbd8 100644 --- a/Sources/Sentry/Public/SentryFrame.h +++ b/Sources/Sentry/Public/SentryFrame.h @@ -74,6 +74,24 @@ NS_SWIFT_NAME(Frame) */ @property (nonatomic, copy) NSNumber *_Nullable columnNumber; +/** + * Source code line at the error location. + * Mostly used for Godot errors. + */ +@property (nonatomic, copy) NSString *_Nullable contextLine; + +/** + * Source code lines before the error location (up to 5 lines). + * Mostly used for Godot errors. + */ +@property (nonatomic, copy) NSArray *_Nullable preContext; + +/** + * Source code lines after the error location (up to 5 lines). + * Mostly used for Godot errors. + */ +@property (nonatomic, copy) NSArray *_Nullable postContext; + /** * Determines if the Frame is inApp or not */ @@ -84,6 +102,12 @@ NS_SWIFT_NAME(Frame) */ @property (nonatomic, copy) NSNumber *_Nullable stackStart; +/** + * A mapping of variables which were available within this frame. + * Mostly used for Godot errors. + */ +@property (nonatomic, copy) NSDictionary *_Nullable vars; + - (instancetype)init; + (instancetype)new NS_UNAVAILABLE; diff --git a/Sources/Sentry/SentryFrame.m b/Sources/Sentry/SentryFrame.m index c66ca71dcf0..499a9746050 100644 --- a/Sources/Sentry/SentryFrame.m +++ b/Sources/Sentry/SentryFrame.m @@ -1,5 +1,6 @@ #import "SentryFrame.h" #import "NSMutableDictionary+Sentry.h" +#import "SentryNSDictionarySanitize.h" NS_ASSUME_NONNULL_BEGIN @@ -27,6 +28,10 @@ - (instancetype)init [serializedData setValue:self.imageAddress forKey:@"image_addr"]; [serializedData setValue:self.instructionAddress forKey:@"instruction_addr"]; [serializedData setValue:self.platform forKey:@"platform"]; + [serializedData setValue:self.contextLine forKey:@"context_line"]; + [serializedData setValue:self.preContext forKey:@"pre_context"]; + [serializedData setValue:self.postContext forKey:@"post_context"]; + [serializedData setValue:sentry_sanitize(self.vars) forKey:@"vars"]; [SentryDictionary setBoolValue:self.inApp forKey:@"in_app" intoDictionary:serializedData]; [SentryDictionary setBoolValue:self.stackStart forKey:@"stack_start" diff --git a/Sources/Swift/Protocol/Codable/SentryFrameCodable.swift b/Sources/Swift/Protocol/Codable/SentryFrameCodable.swift index fecd572532d..77f5bbdd69b 100644 --- a/Sources/Swift/Protocol/Codable/SentryFrameCodable.swift +++ b/Sources/Swift/Protocol/Codable/SentryFrameCodable.swift @@ -27,6 +27,10 @@ extension FrameDecodable: Decodable { // https://github.com/getsentry/sentry-cocoa/issues/4738 case lineNumber = "lineno" case columnNumber = "colno" + case contextLine = "context_line" + case preContext = "pre_context" + case postContext = "post_context" + case vars case inApp = "in_app" case stackStart = "stack_start" } @@ -51,6 +55,12 @@ extension FrameDecodable: Decodable { self.instructionAddress = try container.decodeIfPresent(String.self, forKey: .instructionAddress) self.lineNumber = (try container.decodeIfPresent(NSNumberDecodableWrapper.self, forKey: .lineNumber))?.value self.columnNumber = (try container.decodeIfPresent(NSNumberDecodableWrapper.self, forKey: .columnNumber))?.value + self.contextLine = try container.decodeIfPresent(String.self, forKey: .contextLine) + self.preContext = try container.decodeIfPresent([String].self, forKey: .preContext) + self.postContext = try container.decodeIfPresent([String].self, forKey: .postContext) + self.vars = decodeArbitraryData { + try container.decodeIfPresent([String: ArbitraryData].self, forKey: .vars) + } self.inApp = (try container.decodeIfPresent(NSNumberDecodableWrapper.self, forKey: .inApp))?.value self.stackStart = (try container.decodeIfPresent(NSNumberDecodableWrapper.self, forKey: .stackStart))?.value } diff --git a/Tests/SentryTests/Protocol/SentryFrameTests.swift b/Tests/SentryTests/Protocol/SentryFrameTests.swift index 0aaf6c20f46..97ae035ee40 100644 --- a/Tests/SentryTests/Protocol/SentryFrameTests.swift +++ b/Tests/SentryTests/Protocol/SentryFrameTests.swift @@ -21,10 +21,40 @@ class SentryFrameTests: XCTestCase { XCTAssertEqual(frame.imageAddress, actual["image_addr"] as? String) XCTAssertEqual(frame.instructionAddress, actual["instruction_addr"] as? String) XCTAssertEqual(frame.platform, actual["platform"] as? String) + XCTAssertEqual(frame.contextLine, actual["context_line"] as? String) + XCTAssertEqual(frame.preContext, actual["pre_context"] as? [String]) + XCTAssertEqual(frame.postContext, actual["post_context"] as? [String]) + XCTAssertEqual(frame.vars as? [String: AnyHashable], actual["vars"] as? [String: AnyHashable]) XCTAssertEqual(frame.inApp, actual["in_app"] as? NSNumber) XCTAssertEqual(frame.stackStart, actual["stack_start"] as? NSNumber) } - + + func testSerialize_WithGodotFrame() { + // Arrange + let frame = TestData.godotFrame + + // Act + let actual = frame.serialize() + + // Assert + XCTAssertEqual(frame.symbolAddress, actual["symbol_addr"] as? String) + XCTAssertEqual(frame.fileName, actual["filename"] as? String) + XCTAssertEqual(frame.function, actual["function"] as? String) + XCTAssertEqual(frame.module, actual["module"] as? String) + XCTAssertEqual(frame.lineNumber, actual["lineno"] as? NSNumber) + XCTAssertEqual(frame.columnNumber, actual["colno"] as? NSNumber) + XCTAssertEqual(frame.package, actual["package"] as? String) + XCTAssertEqual(frame.imageAddress, actual["image_addr"] as? String) + XCTAssertEqual(frame.instructionAddress, actual["instruction_addr"] as? String) + XCTAssertEqual(frame.platform, actual["platform"] as? String) + XCTAssertEqual(frame.contextLine, actual["context_line"] as? String) + XCTAssertEqual(frame.preContext, actual["pre_context"] as? [String]) + XCTAssertEqual(frame.postContext, actual["post_context"] as? [String]) + XCTAssertEqual(frame.vars as? [String: AnyHashable], actual["vars"] as? [String: AnyHashable]) + XCTAssertEqual(frame.inApp, actual["in_app"] as? NSNumber) + XCTAssertEqual(frame.stackStart, actual["stack_start"] as? NSNumber) + } + func testDecode_WithAllProperties() throws { // Arrange let frame = TestData.mainFrame @@ -42,11 +72,43 @@ class SentryFrameTests: XCTestCase { XCTAssertEqual(frame.columnNumber, decoded.columnNumber) XCTAssertEqual(frame.package, decoded.package) XCTAssertEqual(frame.imageAddress, decoded.imageAddress) + XCTAssertEqual(frame.instructionAddress, decoded.instructionAddress) XCTAssertEqual(frame.platform, decoded.platform) + XCTAssertEqual(frame.contextLine, decoded.contextLine) + XCTAssertEqual(frame.preContext, decoded.preContext) + XCTAssertEqual(frame.postContext, decoded.postContext) + XCTAssertEqual(frame.vars as? [String: AnyHashable], decoded.vars as? [String: AnyHashable]) XCTAssertEqual(frame.inApp, decoded.inApp) XCTAssertEqual(frame.stackStart, decoded.stackStart) } - + + func testDecode_WithGodotFrame() throws { + // Arrange + let frame = TestData.godotFrame + let data = try XCTUnwrap(SentrySerialization.data(withJSONObject: frame.serialize())) + + // Act + let decoded = try XCTUnwrap(decodeFromJSONData(jsonData: data) as Frame?) + + // Assert + XCTAssertEqual(frame.symbolAddress, decoded.symbolAddress) + XCTAssertEqual(frame.fileName, decoded.fileName) + XCTAssertEqual(frame.function, decoded.function) + XCTAssertEqual(frame.module, decoded.module) + XCTAssertEqual(frame.lineNumber, decoded.lineNumber) + XCTAssertEqual(frame.columnNumber, decoded.columnNumber) + XCTAssertEqual(frame.package, decoded.package) + XCTAssertEqual(frame.imageAddress, decoded.imageAddress) + XCTAssertEqual(frame.instructionAddress, decoded.instructionAddress) + XCTAssertEqual(frame.platform, decoded.platform) + XCTAssertEqual(frame.contextLine, decoded.contextLine) + XCTAssertEqual(frame.preContext, decoded.preContext) + XCTAssertEqual(frame.postContext, decoded.postContext) + XCTAssertEqual(frame.vars as? [String: AnyHashable], decoded.vars as? [String: AnyHashable]) + XCTAssertEqual(frame.inApp, decoded.inApp) + XCTAssertEqual(frame.stackStart, decoded.stackStart) + } + func testDecode_WithAllPropertiesNil() throws { // Arrange let frame = Frame() @@ -66,6 +128,10 @@ class SentryFrameTests: XCTestCase { XCTAssertNil(decoded.imageAddress) XCTAssertNil(decoded.instructionAddress) XCTAssertNil(decoded.platform) + XCTAssertNil(decoded.contextLine) + XCTAssertNil(decoded.preContext) + XCTAssertNil(decoded.postContext) + XCTAssertNil(decoded.vars) XCTAssertNil(decoded.inApp) XCTAssertNil(decoded.stackStart) } @@ -73,5 +139,5 @@ class SentryFrameTests: XCTestCase { func testSerialize_Bools() { SentryBooleanSerialization.test(Frame(), property: "inApp", serializedProperty: "in_app") SentryBooleanSerialization.test(Frame(), property: "stackStart", serializedProperty: "stack_start") - } + } } diff --git a/Tests/SentryTests/Protocol/TestData.swift b/Tests/SentryTests/Protocol/TestData.swift index cabf07b41ea..44f4670a633 100644 --- a/Tests/SentryTests/Protocol/TestData.swift +++ b/Tests/SentryTests/Protocol/TestData.swift @@ -204,6 +204,26 @@ class TestData { return frame } + static var godotFrame: Frame { + let frame = Frame() + frame.fileName = "player/player.gd" + frame.function = "take_damage" + frame.lineNumber = 42 + frame.columnNumber = 15 + frame.platform = "gdscript" + frame.inApp = true + frame.contextLine = " health -= damage" + frame.preContext = [ + "func take_damage(damage):", + " if damage <= 0:", + " return"] + frame.postContext = [ + " if health <= 0:", + " die()"] + frame.vars = ["damage": 25, "health": 75, "player_name": "Hero"] + return frame + } + static var outsideFrame: Frame { let frame = Frame() frame.columnNumber = 1 diff --git a/sdk_api.json b/sdk_api.json index f559b4e9cd7..0cd8630966b 100644 --- a/sdk_api.json +++ b/sdk_api.json @@ -9439,6 +9439,375 @@ } ] }, + { + "kind": "Var", + "name": "contextLine", + "printedName": "contextLine", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)contextLine", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "contextLine", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)contextLine", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "contextLine", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setContextLine:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setContextLine:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "preContext", + "printedName": "preContext", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)preContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "preContext", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)preContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "preContext", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setPreContext:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setPreContext:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "postContext", + "printedName": "postContext", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)postContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "postContext", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)postContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "postContext", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setPostContext:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setPostContext:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, { "kind": "Var", "name": "inApp", @@ -9655,6 +10024,152 @@ } ] }, + { + "kind": "Var", + "name": "vars", + "printedName": "vars", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)vars", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "vars", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)vars", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "vars", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setVars:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setVars:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, { "kind": "Constructor", "name": "init", diff --git a/sdk_api_V9.json b/sdk_api_V9.json index c5df0bca1c9..2b7d3351b64 100644 --- a/sdk_api_V9.json +++ b/sdk_api_V9.json @@ -9182,6 +9182,375 @@ } ] }, + { + "kind": "Var", + "name": "contextLine", + "printedName": "contextLine", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)contextLine", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "contextLine", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)contextLine", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "contextLine", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setContextLine:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setContextLine:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "preContext", + "printedName": "preContext", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)preContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "preContext", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)preContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "preContext", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setPreContext:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setPreContext:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, + { + "kind": "Var", + "name": "postContext", + "printedName": "postContext", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)postContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "postContext", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)postContext", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "postContext", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setPostContext:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setPostContext:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, { "kind": "Var", "name": "inApp", @@ -9398,6 +9767,152 @@ } ] }, + { + "kind": "Var", + "name": "vars", + "printedName": "vars", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "c:objc(cs)SentryFrame(py)vars", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "vars", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)vars", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "vars", + "declAttributes": [ + "DiscardableResult", + "ObjC", + "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": "[Swift.String : Any]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : Any]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "c:objc(cs)SentryFrame(im)setVars:", + "moduleName": "Sentry", + "isOpen": true, + "objc_name": "setVars:", + "declAttributes": [ + "ObjC", + "Dynamic" + ], + "accessorKind": "set" + } + ] + }, { "kind": "Constructor", "name": "init",