From 0d972d47fd6054a54ee822fa5bda40c78b3010a6 Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Fri, 4 Nov 2022 09:33:52 +0100 Subject: [PATCH 1/4] test: Use flush for macOS-SPM sample (#2360) Replace delay with DispatchQueue with flush. --- .../Sources/macOS-SPM-CommandLine/main.swift | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Samples/macOS-SPM-CommandLine/Sources/macOS-SPM-CommandLine/main.swift b/Samples/macOS-SPM-CommandLine/Sources/macOS-SPM-CommandLine/main.swift index 4ff07baa720..bcddb5b706c 100644 --- a/Samples/macOS-SPM-CommandLine/Sources/macOS-SPM-CommandLine/main.swift +++ b/Samples/macOS-SPM-CommandLine/Sources/macOS-SPM-CommandLine/main.swift @@ -11,17 +11,8 @@ SentrySDK.start { options in */ private func captureMessage() { let eventId = SentrySDK.capture(message: "Yeah captured a message") - - // Some Delay to wait for sending the message - let group = DispatchGroup() - group.enter() - let queue = DispatchQueue(label: "delay", qos: .background, attributes: []) - queue.asyncAfter(deadline: .now() + 2) { - group.leave() - } - group.wait() - print("\(String(describing: eventId))") + SentrySDK.flush(timeout: 5) } captureMessage() From c8069a6dafafc5f5938f56ba818ab0e72e03a74b Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Fri, 4 Nov 2022 09:29:48 -0800 Subject: [PATCH 2/4] fix: profiling transaction thread IDs (#2358) * capture thread ID on which each transaction is started - required changing SentryTracer to an ObjC++ file to use our C++ interface to get thread IDs; when this happened, a latent type mismatch was uncovered, breaking the compilation. it required a bit of a nonobvious semantic change from `false` (which resolves to 0, where parentSampled used to be a boolean type property set to false, and was changed to the NSUInteger-backed enum) to `kSentrySampleDecisionUndecided` (which is the 0 value in the enum), and not kSentrySampleDecisionNo as "false" might imply --- CHANGELOG.md | 6 +++ Sentry.xcodeproj/project.pbxproj | 8 ++-- .../Sentry/Public/SentryTransactionContext.h | 1 + Sources/Sentry/SentryProfiler.mm | 9 ++--- ...nContext.m => SentryTransactionContext.mm} | 39 +++++++++++++++++-- .../SentryTransactionContext+Private.h | 5 +++ .../Recording/Monitors/SentryCrashMonitor.c | 2 +- .../Monitors/SentryCrashMonitor_AppState.c | 2 +- .../SentryCrashMonitor_CPPException.cpp | 2 +- .../SentryCrashMonitor_MachException.c | 2 +- .../Monitors/SentryCrashMonitor_NSException.m | 2 +- .../Monitors/SentryCrashMonitor_Signal.c | 2 +- .../Monitors/SentryCrashMonitor_System.m | 2 +- .../Monitors/SentryCrashMonitor_User.c | 2 +- Sources/SentryCrash/Recording/SentryCrash.m | 2 +- Sources/SentryCrash/Recording/SentryCrashC.c | 2 +- .../Recording/SentryCrashCachedData.c | 2 +- .../SentryCrash/Recording/SentryCrashReport.c | 2 +- .../Recording/Tools/SentryCrashCPU.c | 2 +- .../Recording/Tools/SentryCrashCPU_arm.c | 2 +- .../Recording/Tools/SentryCrashCPU_arm64.c | 2 +- .../Recording/Tools/SentryCrashCPU_x86_32.c | 2 +- .../Recording/Tools/SentryCrashCPU_x86_64.c | 2 +- .../Recording/Tools/SentryCrashDebug.c | 2 +- .../Recording/Tools/SentryCrashFileUtils.c | 2 +- .../Tools/SentryCrashMachineContext.c | 2 +- .../Recording/Tools/SentryCrashMemory.c | 2 +- .../Recording/Tools/SentryCrashObjCApple.h | 4 +- .../Recording/Tools/SentryCrashStackCursor.c | 2 +- .../Tools/SentryCrashStackCursor_Backtrace.c | 2 +- .../Tools/SentryCrashStackCursor_SelfThread.c | 2 +- .../Recording/Tools/SentryCrashSysCtl.c | 2 +- .../Recording/Tools/SentryCrashThread.c | 2 +- .../Filters/SentryCrashReportFilterBasic.m | 2 +- .../Profiling/SentryProfilerSwiftTests.swift | 8 ++-- 35 files changed, 88 insertions(+), 46 deletions(-) rename Sources/Sentry/{SentryTransactionContext.m => SentryTransactionContext.mm} (73%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0287087076c..d4138889120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Fix issue with invalid profiles uploading (#2358) + ## 7.30.0 ### Features diff --git a/Sentry.xcodeproj/project.pbxproj b/Sentry.xcodeproj/project.pbxproj index caf96fff5a5..163e4c08a46 100644 --- a/Sentry.xcodeproj/project.pbxproj +++ b/Sentry.xcodeproj/project.pbxproj @@ -651,7 +651,7 @@ 8ECC674725C23A20000E2BF6 /* SentrySpanContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ECC674325C23A1F000E2BF6 /* SentrySpanContext.m */; }; 8ECC674825C23A20000E2BF6 /* SentryTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ECC674425C23A1F000E2BF6 /* SentryTransaction.m */; }; 8ECC674925C23A20000E2BF6 /* SentrySpanId.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ECC674525C23A20000E2BF6 /* SentrySpanId.m */; }; - 8ECC674A25C23A20000E2BF6 /* SentryTransactionContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.m */; }; + 8ECC674A25C23A20000E2BF6 /* SentryTransactionContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.mm */; }; 8ED2D28026A6581C00CA8329 /* NSURLProtocolSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ED2D27F26A6581C00CA8329 /* NSURLProtocolSwizzle.m */; }; 8ED3D306264DFE700049393B /* SentryUIViewControllerSanitizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ED3D305264DFE700049393B /* SentryUIViewControllerSanitizerTests.swift */; }; 8EE017A126704CD500470616 /* SentryUIViewControllerPerformanceTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA1ED0E2669152F00E62B98 /* SentryUIViewControllerPerformanceTrackerTests.swift */; }; @@ -1443,7 +1443,7 @@ 8ECC674325C23A1F000E2BF6 /* SentrySpanContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySpanContext.m; sourceTree = ""; }; 8ECC674425C23A1F000E2BF6 /* SentryTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryTransaction.m; sourceTree = ""; }; 8ECC674525C23A20000E2BF6 /* SentrySpanId.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentrySpanId.m; sourceTree = ""; }; - 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SentryTransactionContext.m; sourceTree = ""; }; + 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryTransactionContext.mm; sourceTree = ""; }; 8ED2D27E26A6581C00CA8329 /* NSURLProtocolSwizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSURLProtocolSwizzle.h; sourceTree = ""; }; 8ED2D27F26A6581C00CA8329 /* NSURLProtocolSwizzle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSURLProtocolSwizzle.m; sourceTree = ""; }; 8ED3D305264DFE700049393B /* SentryUIViewControllerSanitizerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIViewControllerSanitizerTests.swift; sourceTree = ""; }; @@ -2816,7 +2816,7 @@ 8E4E7C6B25DAAAFE006AB9E2 /* SentryTransaction.h */, 8ECC674425C23A1F000E2BF6 /* SentryTransaction.m */, 8ECC673B25C23996000E2BF6 /* SentryTransactionContext.h */, - 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.m */, + 8ECC674625C23A20000E2BF6 /* SentryTransactionContext.mm */, 0A56DA5E28ABA01B00C400D5 /* SentryTransactionContext+Private.h */, 8EC4CF4725C38CAF0093DEE9 /* SentrySpanStatus.h */, 8453421528BE8A9500C22EEC /* SentrySpanStatus.m */, @@ -3328,7 +3328,7 @@ 7B3B473825D6CC7E00D01640 /* SentryNSError.m in Sources */, D8ACE3C82762187200F5A213 /* SentryNSDataTracker.m in Sources */, 7BE3C77D2446112C00A38442 /* SentryRateLimitParser.m in Sources */, - 8ECC674A25C23A20000E2BF6 /* SentryTransactionContext.m in Sources */, + 8ECC674A25C23A20000E2BF6 /* SentryTransactionContext.mm in Sources */, 03BCC38C27E1C01A003232C7 /* SentryTime.mm in Sources */, A8F17B342902870300990B25 /* SentryHttpStatusCodeRange.m in Sources */, 03F84D3727DD4191008FE43F /* SentrySamplingProfiler.cpp in Sources */, diff --git a/Sources/Sentry/Public/SentryTransactionContext.h b/Sources/Sentry/Public/SentryTransactionContext.h index a5e3224ee0b..16384bf07c6 100644 --- a/Sources/Sentry/Public/SentryTransactionContext.h +++ b/Sources/Sentry/Public/SentryTransactionContext.h @@ -4,6 +4,7 @@ NS_ASSUME_NONNULL_BEGIN @class SentrySpanId; +@class SentryThread; NS_SWIFT_NAME(TransactionContext) @interface SentryTransactionContext : SentrySpanContext diff --git a/Sources/Sentry/SentryProfiler.mm b/Sources/Sentry/SentryProfiler.mm index b86702ee409..cb2fcdb801a 100644 --- a/Sources/Sentry/SentryProfiler.mm +++ b/Sources/Sentry/SentryProfiler.mm @@ -22,9 +22,10 @@ # import "SentryScreenFrames.h" # import "SentrySerialization.h" # import "SentrySpanId.h" +# import "SentryThread.h" # import "SentryTime.h" # import "SentryTransaction.h" -# import "SentryTransactionContext.h" +# import "SentryTransactionContext+Private.h" # if defined(DEBUG) # include @@ -573,7 +574,6 @@ - (void)captureEnvelope // populate info from all transactions that occurred while profiler was running auto transactionsInfo = [NSMutableArray array]; - NSString *mainThreadID = [profile[@"profile"][@"samples"] firstObject][@"thread_id"]; for (SentryTransaction *transaction in _transactions) { const auto relativeStart = [NSString stringWithFormat:@"%llu", @@ -593,10 +593,7 @@ - (void)captureEnvelope @"name" : transaction.transaction, @"relative_start_ns" : relativeStart, @"relative_end_ns" : relativeEnd, - @"active_thread_id" : - mainThreadID // TODO: we are just using the main thread ID for all transactions to - // fix a backend validation error, but this needs to be gathered from - // transaction starts in their contexts and carried forward to here + @"active_thread_id" : [transaction.trace.transactionContext sentry_threadInfo].threadId }]; } profile[@"transactions"] = transactionsInfo; diff --git a/Sources/Sentry/SentryTransactionContext.m b/Sources/Sentry/SentryTransactionContext.mm similarity index 73% rename from Sources/Sentry/SentryTransactionContext.m rename to Sources/Sentry/SentryTransactionContext.mm index 238af2c407e..895deb6a770 100644 --- a/Sources/Sentry/SentryTransactionContext.m +++ b/Sources/Sentry/SentryTransactionContext.mm @@ -1,7 +1,22 @@ #import "SentryTransactionContext.h" +#include "SentryProfilingConditionals.h" +#import "SentryThread.h" +#include "SentryThreadHandle.hpp" +#import "SentryTransactionContext+Private.h" NS_ASSUME_NONNULL_BEGIN +static const auto kSentryDefaultSamplingDecision = kSentrySampleDecisionUndecided; + +@interface +SentryTransactionContext () + +#if SENTRY_TARGET_PROFILING_SUPPORTED +@property (nonatomic, strong) SentryThread *threadInfo; +#endif + +@end + @implementation SentryTransactionContext - (instancetype)initWithName:(NSString *)name operation:(NSString *)operation @@ -18,7 +33,8 @@ - (instancetype)initWithName:(NSString *)name if (self = [super initWithOperation:operation]) { _name = [NSString stringWithString:name]; _nameSource = source; - self.parentSampled = false; + self.parentSampled = kSentryDefaultSamplingDecision; + [self getThreadInfo]; } return self; } @@ -41,7 +57,8 @@ - (instancetype)initWithName:(NSString *)name if (self = [super initWithOperation:operation sampled:sampled]) { _name = [NSString stringWithString:name]; _nameSource = source; - self.parentSampled = false; + self.parentSampled = kSentryDefaultSamplingDecision; + [self getThreadInfo]; } return self; } @@ -74,14 +91,30 @@ - (instancetype)initWithName:(NSString *)name spanId:spanId parentId:parentSpanId operation:operation - sampled:false]) { + sampled:kSentryDefaultSamplingDecision]) { _name = [NSString stringWithString:name]; _nameSource = source; self.parentSampled = parentSampled; + [self getThreadInfo]; } return self; } +- (void)getThreadInfo +{ +#if SENTRY_TARGET_PROFILING_SUPPORTED + const auto threadID = sentry::profiling::ThreadHandle::current()->tid(); + self.threadInfo = [[SentryThread alloc] initWithThreadId:@(threadID)]; +#endif +} + +#if SENTRY_TARGET_PROFILING_SUPPORTED +- (SentryThread *)sentry_threadInfo +{ + return self.threadInfo; +} +#endif + @end NS_ASSUME_NONNULL_END diff --git a/Sources/Sentry/include/SentryTransactionContext+Private.h b/Sources/Sentry/include/SentryTransactionContext+Private.h index 33dfff9d6c9..cc9594a1994 100644 --- a/Sources/Sentry/include/SentryTransactionContext+Private.h +++ b/Sources/Sentry/include/SentryTransactionContext+Private.h @@ -1,3 +1,4 @@ +#include "SentryProfilingConditionals.h" #import "SentryTransactionContext.h" NS_ASSUME_NONNULL_BEGIN @@ -22,6 +23,10 @@ SentryTransactionContext (Private) parentSpanId:(nullable SentrySpanId *)parentSpanId parentSampled:(SentrySampleDecision)parentSampled; +#if SENTRY_TARGET_PROFILING_SUPPORTED +- (SentryThread *)sentry_threadInfo; +#endif + @end NS_ASSUME_NONNULL_END diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor.c b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor.c index f446dd915f4..0981258bc00 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor.c +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor.c @@ -42,7 +42,7 @@ #include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" // ============================================================================ diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_AppState.c b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_AppState.c index a59dd9c908f..795fd320235 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_AppState.c +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_AppState.c @@ -30,7 +30,7 @@ #include "SentryCrashJSONCodec.h" #include "SentryCrashMonitorContext.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp index 787909a68f8..6e91d72b4a7 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp @@ -29,7 +29,7 @@ #include "SentryCrashStackCursor_SelfThread.h" #include "SentryCrashThread.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c index a18a4b81b0f..7e73a4e8302 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c @@ -32,7 +32,7 @@ #include "SentryCrashSystemCapabilities.h" #include "SentryCrashThread.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #if SentryCrashCRASH_HAS_MACH diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m index a6f6168d734..9fb2f68cf76 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_NSException.m @@ -31,7 +31,7 @@ #import "SentryCrashStackCursor_Backtrace.h" #include "SentryCrashThread.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #import "SentryCrashLogger.h" // ============================================================================ diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Signal.c b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Signal.c index adb56a472e8..389aa1a7d8d 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Signal.c +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_Signal.c @@ -32,7 +32,7 @@ #include "SentryCrashStackCursor_MachineContext.h" #include "SentryCrashSystemCapabilities.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #if SentryCrashCRASH_HAS_SIGNAL diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_System.m b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_System.m index cf987b09857..10ee347e819 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_System.m +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_System.m @@ -33,7 +33,7 @@ #import "SentryCrashSysCtl.h" #import "SentryCrashSystemCapabilities.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #import "SentryCrashLogger.h" #import diff --git a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_User.c b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_User.c index 76e6b7443f9..f4bcebf7b77 100644 --- a/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_User.c +++ b/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_User.c @@ -28,7 +28,7 @@ #include "SentryCrashStackCursor_SelfThread.h" #include "SentryCrashThread.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/SentryCrash.m b/Sources/SentryCrash/Recording/SentryCrash.m index 36b51320c8b..c4e10cc9649 100644 --- a/Sources/SentryCrash/Recording/SentryCrash.m +++ b/Sources/SentryCrash/Recording/SentryCrash.m @@ -38,7 +38,7 @@ #import "SentryCrashSystemCapabilities.h" #import -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #import "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/SentryCrashC.c b/Sources/SentryCrash/Recording/SentryCrashC.c index ff2066f5bd2..a2a0adc7bed 100644 --- a/Sources/SentryCrash/Recording/SentryCrashC.c +++ b/Sources/SentryCrash/Recording/SentryCrashC.c @@ -40,7 +40,7 @@ #include "SentryCrashString.h" #include "SentryCrashSystemCapabilities.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/SentryCrashCachedData.c b/Sources/SentryCrash/Recording/SentryCrashCachedData.c index fef8d6f3d6e..7e1362f3a33 100644 --- a/Sources/SentryCrash/Recording/SentryCrashCachedData.c +++ b/Sources/SentryCrash/Recording/SentryCrashCachedData.c @@ -24,7 +24,7 @@ #include "SentryCrashCachedData.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/SentryCrashReport.c b/Sources/SentryCrash/Recording/SentryCrashReport.c index 79693f07837..9c705d3ae65 100644 --- a/Sources/SentryCrash/Recording/SentryCrashReport.c +++ b/Sources/SentryCrash/Recording/SentryCrashReport.c @@ -47,7 +47,7 @@ #include "SentryCrashUUIDConversion.h" #include "SentryScopeSyncC.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU.c b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU.c index 106b624a7e6..cd4d147ffc5 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU.c @@ -31,7 +31,7 @@ #include #include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" const char * diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm.c b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm.c index 0159c08dea1..90bb24551b7 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm.c @@ -32,7 +32,7 @@ # include "SentryCrashMachineContext_Apple.h" # include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE # include "SentryCrashLogger.h" static const char *g_registerNames[] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm64.c b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm64.c index 877b474d2aa..4cd9939b248 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm64.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_arm64.c @@ -32,7 +32,7 @@ # include "SentryCrashMachineContext_Apple.h" # include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE # include "SentryCrashLogger.h" # define KSPACStrippingMask_ARM64e 0x0000000fffffffff diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_32.c b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_32.c index 3addbb4148f..36acd112d89 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_32.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_32.c @@ -32,7 +32,7 @@ # include "SentryCrashMachineContext_Apple.h" # include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE # include "SentryCrashLogger.h" static const char *g_registerNames[] = { diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_64.c b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_64.c index d4bc29b58d5..27f1e62cba5 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_64.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashCPU_x86_64.c @@ -33,7 +33,7 @@ # include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE # include "SentryCrashLogger.h" static const char *g_registerNames[] = { "rax", "rbx", "rcx", "rdx", "rdi", "rsi", "rbp", "rsp", diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashDebug.c b/Sources/SentryCrash/Recording/Tools/SentryCrashDebug.c index 928126c3dcc..ef956a4a4c6 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashDebug.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashDebug.c @@ -26,7 +26,7 @@ #include "SentryCrashDebug.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c b/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c index 79cfc1e4d63..500b7300d29 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashFileUtils.c @@ -26,7 +26,7 @@ #include "SentryCrashFileUtils.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashMachineContext.c b/Sources/SentryCrash/Recording/Tools/SentryCrashMachineContext.c index 0020ea20162..7461add0290 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashMachineContext.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashMachineContext.c @@ -33,7 +33,7 @@ #include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #ifdef __arm64__ diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashMemory.c b/Sources/SentryCrash/Recording/Tools/SentryCrashMemory.c index 3e728572643..5a64d1ce3c2 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashMemory.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashMemory.c @@ -26,7 +26,7 @@ #include "SentryCrashMemory.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include <_types/_uint8_t.h> diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashObjCApple.h b/Sources/SentryCrash/Recording/Tools/SentryCrashObjCApple.h index ca5e331b2ad..441c108dd1f 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashObjCApple.h +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashObjCApple.h @@ -86,7 +86,7 @@ extern "C" { // SentryCrash: The original values wouldn't have worked. The slot shift and // mask were incorrect. # define TAG_COUNT 8 -//#define TAG_SLOT_MASK 0xf +// #define TAG_SLOT_MASK 0xf # define TAG_SLOT_MASK 0x07 # if SUPPORT_MSB_TAGGED_POINTERS @@ -96,7 +96,7 @@ extern "C" { # define TAG_PAYLOAD_RSHIFT 4 # else # define TAG_MASK 1 -//# define TAG_SLOT_SHIFT 0 +// # define TAG_SLOT_SHIFT 0 # define TAG_SLOT_SHIFT 1 # define TAG_PAYLOAD_LSHIFT 0 # define TAG_PAYLOAD_RSHIFT 4 diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor.c b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor.c index 686bc8f4f74..409ab9ed575 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor.c @@ -27,7 +27,7 @@ #include "SentryCrashSymbolicator.h" #include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" static bool diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_Backtrace.c b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_Backtrace.c index 2048f8ca9d1..b8b349ccacd 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_Backtrace.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_Backtrace.c @@ -25,7 +25,7 @@ #include "SentryCrashStackCursor_Backtrace.h" #include "SentryCrashCPU.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" static bool diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_SelfThread.c b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_SelfThread.c index 38af9638144..3afd3fd7e93 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_SelfThread.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashStackCursor_SelfThread.c @@ -26,7 +26,7 @@ #include "SentryCrashStackCursor_Backtrace.h" #include -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #define MAX_BACKTRACE_LENGTH \ diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashSysCtl.c b/Sources/SentryCrash/Recording/Tools/SentryCrashSysCtl.c index 9a370916735..c3acc0a05dc 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashSysCtl.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashSysCtl.c @@ -26,7 +26,7 @@ #include "SentryCrashSysCtl.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Recording/Tools/SentryCrashThread.c b/Sources/SentryCrash/Recording/Tools/SentryCrashThread.c index 79a3ba4fb73..dffdb23034f 100644 --- a/Sources/SentryCrash/Recording/Tools/SentryCrashThread.c +++ b/Sources/SentryCrash/Recording/Tools/SentryCrashThread.c @@ -29,7 +29,7 @@ #include "SentryCrashMemory.h" #include "SentryCrashSystemCapabilities.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #include "SentryCrashLogger.h" #include diff --git a/Sources/SentryCrash/Reporting/Filters/SentryCrashReportFilterBasic.m b/Sources/SentryCrash/Reporting/Filters/SentryCrashReportFilterBasic.m index b2ed90c7a97..17c7c66a625 100644 --- a/Sources/SentryCrash/Reporting/Filters/SentryCrashReportFilterBasic.m +++ b/Sources/SentryCrash/Reporting/Filters/SentryCrashReportFilterBasic.m @@ -29,7 +29,7 @@ #import "NSError+SentrySimpleConstructor.h" #import "SentryCrashVarArgs.h" -//#define SentryCrashLogger_LocalLevel TRACE +// #define SentryCrashLogger_LocalLevel TRACE #import "SentryCrashLogger.h" @implementation SentryCrashReportFilterPassthrough diff --git a/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift b/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift index 188abdcecba..a99a0eec51a 100644 --- a/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift +++ b/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift @@ -313,17 +313,17 @@ private extension SentryProfilerSwiftTests { } XCTAssert(foundAtLeastOneNonEmptySample) - let transactions = profile["transactions"] as? [[String: String]] + let transactions = profile["transactions"] as? [[String: Any]] XCTAssertEqual(transactions!.count, numberOfTransactions) for transaction in transactions! { - XCTAssertEqual(fixture.transactionName, transaction["name"]) + XCTAssertEqual(fixture.transactionName, transaction["name"] as! String) XCTAssertNotNil(transaction["id"]) if let idString = transaction["id"] { - XCTAssertNotEqual(SentryId.empty, SentryId(uuidString: idString)) + XCTAssertNotEqual(SentryId.empty, SentryId(uuidString: idString as! String)) } XCTAssertNotNil(transaction["trace_id"]) if let traceIDString = transaction["trace_id"] { - XCTAssertNotEqual(SentryId.empty, SentryId(uuidString: traceIDString)) + XCTAssertNotEqual(SentryId.empty, SentryId(uuidString: traceIDString as! String)) } XCTAssertNotNil(transaction["trace_id"]) XCTAssertNotNil(transaction["relative_start_ns"]) From 059320e4947025875a0ef149666f819e244a042c Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Fri, 4 Nov 2022 10:04:58 -0800 Subject: [PATCH 3/4] fix: profiling transaction timestamps (#2359) * discard transactions that end before the profile started --- CHANGELOG.md | 2 +- Sources/Sentry/SentryProfiler.mm | 38 ++++++++++++++++--- Sources/Sentry/SentrySpan.m | 6 ++- Sources/Sentry/SentryTracer.m | 4 ++ .../Profiling/SentryProfilerSwiftTests.swift | 2 +- 5 files changed, 42 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4138889120..44bff4d10aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Fixes -- Fix issue with invalid profiles uploading (#2358) +- Fix issue with invalid profiles uploading (#2358 and #2359) ## 7.30.0 diff --git a/Sources/Sentry/SentryProfiler.mm b/Sources/Sentry/SentryProfiler.mm index cb2fcdb801a..70b4cd1358c 100644 --- a/Sources/Sentry/SentryProfiler.mm +++ b/Sources/Sentry/SentryProfiler.mm @@ -574,19 +574,38 @@ - (void)captureEnvelope // populate info from all transactions that occurred while profiler was running auto transactionsInfo = [NSMutableArray array]; + SENTRY_LOG_DEBUG(@"Profile start timestamp: %@ absolute time: %llu", _startDate, + (unsigned long long)_startTimestamp); + SENTRY_LOG_DEBUG(@"Profile end timestamp: %@ absolute time: %llu", _endDate, + (unsigned long long)_endTimestamp); for (SentryTransaction *transaction in _transactions) { + SENTRY_LOG_DEBUG(@"Transaction %@ start timestamp: %@", transaction.trace.context.traceId, + transaction.startTimestamp); + SENTRY_LOG_DEBUG(@"Transaction %@ end timestamp: %@", transaction.trace.context.traceId, + transaction.timestamp); const auto relativeStart = [NSString stringWithFormat:@"%llu", [transaction.startTimestamp compare:_startDate] == NSOrderedAscending ? 0 : (unsigned long long)( [transaction.startTimestamp timeIntervalSinceDate:_startDate] * 1e9)]; - const auto relativeEnd = - [NSString stringWithFormat:@"%llu", - [transaction.timestamp compare:_endDate] == NSOrderedDescending - ? profileDuration - : (unsigned long long)( - [transaction.timestamp timeIntervalSinceDate:_startDate] * 1e9)]; + + NSString *relativeEnd; + if ([transaction.timestamp compare:_endDate] == NSOrderedDescending) { + relativeEnd = [NSString stringWithFormat:@"%llu", profileDuration]; + } else { + const auto profileStartToTransactionEnd_ns = + [transaction.timestamp timeIntervalSinceDate:_startDate] * 1e9; + if (profileStartToTransactionEnd_ns < 0) { + SENTRY_LOG_DEBUG(@"Transaction %@ ended before the profiler started, won't " + @"associate it with this profile.", + transaction.trace.context.traceId.sentryIdString); + continue; + } else { + relativeEnd = [NSString + stringWithFormat:@"%llu", (unsigned long long)profileStartToTransactionEnd_ns]; + } + } [transactionsInfo addObject:@{ @"id" : transaction.eventId.sentryIdString, @"trace_id" : transaction.trace.context.traceId.sentryIdString, @@ -596,6 +615,11 @@ - (void)captureEnvelope @"active_thread_id" : [transaction.trace.transactionContext sentry_threadInfo].threadId }]; } + + if (transactionsInfo.count == 0) { + SENTRY_LOG_DEBUG(@"No transactions to associate with this profile, will not upload."); + return; + } profile[@"transactions"] = transactionsInfo; NSError *error = nil; @@ -610,6 +634,8 @@ - (void)captureEnvelope const auto item = [[SentryEnvelopeItem alloc] initWithHeader:header data:JSONData]; const auto envelopeHeader = [[SentryEnvelopeHeader alloc] initWithId:profileID]; const auto envelope = [[SentryEnvelope alloc] initWithHeader:envelopeHeader singleItem:item]; + + SENTRY_LOG_DEBUG(@"Capturing profile envelope."); [_hub captureEnvelope:envelope]; } diff --git a/Sources/Sentry/SentrySpan.m b/Sources/Sentry/SentrySpan.m index 17c60188777..766a94af0a2 100644 --- a/Sources/Sentry/SentrySpan.m +++ b/Sources/Sentry/SentrySpan.m @@ -25,8 +25,8 @@ @implementation SentrySpan { - (instancetype)initWithTracer:(SentryTracer *)tracer context:(SentrySpanContext *)context { if (self = [super init]) { - SENTRY_LOG_DEBUG( - @"Starting span %@ with tracer %@", context.spanId.sentrySpanIdString, tracer); + SENTRY_LOG_DEBUG(@"Created span %@ for trace ID %@", context.spanId.sentrySpanIdString, + tracer.context.traceId); _tracer = tracer; _context = context; self.startTimestamp = [SentryCurrentDate date]; @@ -128,6 +128,8 @@ - (void)finishWithStatus:(SentrySpanStatus)status _isFinished = YES; if (self.timestamp == nil) { self.timestamp = [SentryCurrentDate date]; + SENTRY_LOG_DEBUG(@"Setting span timestamp: %@ at system time %llu", self.timestamp, + (unsigned long long)getAbsoluteTime()); } if (self.tracer != nil) { [self.tracer spanFinished:self]; diff --git a/Sources/Sentry/SentryTracer.m b/Sources/Sentry/SentryTracer.m index 8ce9a43fccf..b87578b68fd 100644 --- a/Sources/Sentry/SentryTracer.m +++ b/Sources/Sentry/SentryTracer.m @@ -143,6 +143,8 @@ - (instancetype)initWithTransactionContext:(SentryTransactionContext *)transacti dispatchQueueWrapper:(nullable SentryDispatchQueueWrapper *)dispatchQueueWrapper { if (self = [super init]) { + SENTRY_LOG_DEBUG( + @"Starting transaction at system time %llu", (unsigned long long)getAbsoluteTime()); self.rootSpan = [[SentrySpan alloc] initWithTracer:self context:transactionContext]; self.transactionContext = transactionContext; _children = [[NSMutableArray alloc] init]; @@ -399,6 +401,8 @@ - (SentryTraceHeader *)toTraceHeader - (void)finish { + SENTRY_LOG_DEBUG( + @"-[SentryTracer finish] for trace ID %@", _traceContext.traceId.sentryIdString); [self finishWithStatus:kSentrySpanStatusOk]; } diff --git a/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift b/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift index a99a0eec51a..6d794e96acc 100644 --- a/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift +++ b/Tests/SentryTests/Profiling/SentryProfilerSwiftTests.swift @@ -327,7 +327,7 @@ private extension SentryProfilerSwiftTests { } XCTAssertNotNil(transaction["trace_id"]) XCTAssertNotNil(transaction["relative_start_ns"]) - XCTAssertNotNil(transaction["relative_end_ns"]) + XCTAssertFalse((transaction["relative_end_ns"] as! NSString).isEqual(to: "0")) XCTAssertNotNil(transaction["active_thread_id"]) } From ccda930f753d0e420d9d3da73692e9ae82f33187 Mon Sep 17 00:00:00 2001 From: getsentry-bot Date: Fri, 4 Nov 2022 18:06:47 +0000 Subject: [PATCH 4/4] release: 7.30.1 --- CHANGELOG.md | 2 +- Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj | 8 ++++---- Sentry.podspec | 2 +- Sources/Configuration/Sentry.xcconfig | 2 +- Sources/Sentry/SentryMeta.m | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bff4d10aa..a1f03cda1aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 7.30.1 ### Fixes diff --git a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj index 3fd493faa5d..47240799965 100644 --- a/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj +++ b/Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj @@ -1096,7 +1096,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 7.30.0; + MARKETING_VERSION = 7.30.1; PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift"; @@ -1125,7 +1125,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 7.30.0; + MARKETING_VERSION = 7.30.1; PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift"; @@ -1770,7 +1770,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 7.30.0; + MARKETING_VERSION = 7.30.1; PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift.Clip"; @@ -1805,7 +1805,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 7.30.0; + MARKETING_VERSION = 7.30.1; PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift.Clip"; diff --git a/Sentry.podspec b/Sentry.podspec index 553a421ae8d..80b7ba089b2 100644 --- a/Sentry.podspec +++ b/Sentry.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Sentry" - s.version = "7.30.0" + s.version = "7.30.1" s.summary = "Sentry client for cocoa" s.homepage = "https://github.com/getsentry/sentry-cocoa" s.license = "mit" diff --git a/Sources/Configuration/Sentry.xcconfig b/Sources/Configuration/Sentry.xcconfig index f93455b6434..801b602dd4e 100644 --- a/Sources/Configuration/Sentry.xcconfig +++ b/Sources/Configuration/Sentry.xcconfig @@ -28,7 +28,7 @@ MACH_O_TYPE = mh_dylib FRAMEWORK_VERSION = A PRODUCT_NAME = Sentry -CURRENT_PROJECT_VERSION = 7.30.0 +CURRENT_PROJECT_VERSION = 7.30.1 INFOPLIST_FILE = Sources/Sentry/Info.plist PRODUCT_BUNDLE_IDENTIFIER = io.sentry.Sentry ALWAYS_SEARCH_USER_PATHS = NO diff --git a/Sources/Sentry/SentryMeta.m b/Sources/Sentry/SentryMeta.m index 63eeb36ed40..7902b4cb145 100644 --- a/Sources/Sentry/SentryMeta.m +++ b/Sources/Sentry/SentryMeta.m @@ -5,7 +5,7 @@ @implementation SentryMeta // Don't remove the static keyword. If you do the compiler adds the constant name to the global // symbol table and it might clash with other constants. When keeping the static keyword the // compiler replaces all occurrences with the value. -static NSString *versionString = @"7.30.0"; +static NSString *versionString = @"7.30.1"; static NSString *sdkName = @"sentry.cocoa"; + (NSString *)versionString