diff --git a/Automattic-Tracks-iOS.podspec b/Automattic-Tracks-iOS.podspec index 378e68d5..e691dcd4 100644 --- a/Automattic-Tracks-iOS.podspec +++ b/Automattic-Tracks-iOS.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = 'Automattic-Tracks-iOS' - s.version = '2.2.0' + s.version = '2.3.0' s.summary = 'Simple way to track events in an iOS app with Automattic Tracks internal service' s.description = <<-DESC diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c779ecf..b750c7db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ _None._ --> -## Unreleased +## 2.3.0 ### Breaking Changes @@ -38,7 +38,7 @@ _None._ ### New Features -_None._ +- Add options to configure Sentry's app hang and HTTP client error tracking. [#261] ### Bug Fixes diff --git a/Sources/Model/ObjC/Constants/TracksConstants.m b/Sources/Model/ObjC/Constants/TracksConstants.m index 9ed77d19..953a8f31 100644 --- a/Sources/Model/ObjC/Constants/TracksConstants.m +++ b/Sources/Model/ObjC/Constants/TracksConstants.m @@ -1,4 +1,4 @@ #import "TracksConstants.h" NSString *const TracksErrorDomain = @"TracksErrorDomain"; -NSString *const TracksLibraryVersion = @"2.2.0"; +NSString *const TracksLibraryVersion = @"2.3.0"; diff --git a/Sources/Remote Logging/Crash Logging/CrashLogging.swift b/Sources/Remote Logging/Crash Logging/CrashLogging.swift index fedd0cb7..1f950a25 100644 --- a/Sources/Remote Logging/Crash Logging/CrashLogging.swift +++ b/Sources/Remote Logging/Crash Logging/CrashLogging.swift @@ -58,6 +58,8 @@ public class CrashLogging { options.environment = self.dataProvider.buildType options.releaseName = self.dataProvider.releaseName options.enableAutoSessionTracking = self.dataProvider.shouldEnableAutomaticSessionTracking + options.enableAppHangTracking = self.dataProvider.enableAppHangTracking + options.enableCaptureFailedRequests = self.dataProvider.enableCaptureFailedRequests options.beforeSend = self.beforeSend diff --git a/Sources/Remote Logging/Crash Logging/CrashLoggingDataProvider.swift b/Sources/Remote Logging/Crash Logging/CrashLoggingDataProvider.swift index 860c219d..e3e72287 100644 --- a/Sources/Remote Logging/Crash Logging/CrashLoggingDataProvider.swift +++ b/Sources/Remote Logging/Crash Logging/CrashLoggingDataProvider.swift @@ -13,6 +13,10 @@ public protocol CrashLoggingDataProvider { var additionalUserData: [String: Any] { get } var shouldEnableAutomaticSessionTracking: Bool { get } var performanceTracking: PerformanceTracking { get } + /// Whether app hang are captured. + var enableAppHangTracking: Bool { get } + /// Whether HTTP client errors are captured. + var enableCaptureFailedRequests: Bool { get } } /// Default implementations of common protocol properties @@ -80,4 +84,14 @@ public extension CrashLoggingDataProvider { guard case .enabled(let config) = performanceTracking else { return false } return config.trackUserInteraction } + + /// App hang tracking is disabled by default to avoid unexpected events being tracked. + var enableAppHangTracking: Bool { + return false + } + + /// HTTP client errors are disabled by default to avoid unexpected events being tracked. + var enableCaptureFailedRequests: Bool { + return false + } }