diff --git a/CHANGELOG.md b/CHANGELOG.md index e8721386e0..69022a5853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - feat: API to manually start/stop Session Replay (#4414) - Custom redact modifier for SwiftUI (#4362, #4392) +- Track usage of appHangTrackingV2 (#4445) ### Removal of Experimental API @@ -27,6 +28,7 @@ via the option `swizzleClassNameExclude`. - Serializing profile on a BG Thread (#4377) to avoid potentially slightly blocking the main thread. - Session Replay performance for SwiftUI (#4419) - Speed up getBinaryImages (#4435) for finishing transactions and capturing events +- Align SDK dispatch queue names (#4442) to start with `io.sentry` - Use UInts in envelope deserialization (#4441) ## 8.38.0 diff --git a/Sources/Sentry/SentryDispatchQueueWrapper.m b/Sources/Sentry/SentryDispatchQueueWrapper.m index f0104861a4..96cf89e65b 100644 --- a/Sources/Sentry/SentryDispatchQueueWrapper.m +++ b/Sources/Sentry/SentryDispatchQueueWrapper.m @@ -12,7 +12,7 @@ - (instancetype)init // iOS 9 we need to manually add the autoreleasepool. dispatch_queue_attr_t attributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - self = [self initWithName:"sentry-default" attributes:attributes]; + self = [self initWithName:"io.sentry.default" attributes:attributes]; return self; } diff --git a/Sources/Sentry/SentryPerformanceTrackingIntegration.m b/Sources/Sentry/SentryPerformanceTrackingIntegration.m index 4975d4ef9e..8f2eb8a209 100644 --- a/Sources/Sentry/SentryPerformanceTrackingIntegration.m +++ b/Sources/Sentry/SentryPerformanceTrackingIntegration.m @@ -29,7 +29,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options dispatch_queue_attr_t attributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, DISPATCH_QUEUE_PRIORITY_HIGH, 0); SentryDispatchQueueWrapper *dispatchQueue = - [[SentryDispatchQueueWrapper alloc] initWithName:"sentry-ui-view-controller-swizzling" + [[SentryDispatchQueueWrapper alloc] initWithName:"io.sentry.ui-view-controller-swizzling" attributes:attributes]; SentrySubClassFinder *subClassFinder = [[SentrySubClassFinder alloc] diff --git a/Sources/Sentry/SentryTransportFactory.m b/Sources/Sentry/SentryTransportFactory.m index 65dddc900d..cbdd10e599 100644 --- a/Sources/Sentry/SentryTransportFactory.m +++ b/Sources/Sentry/SentryTransportFactory.m @@ -59,7 +59,7 @@ @implementation SentryTransportFactory dispatch_queue_attr_t attributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, DISPATCH_QUEUE_PRIORITY_LOW, 0); SentryDispatchQueueWrapper *dispatchQueueWrapper = - [[SentryDispatchQueueWrapper alloc] initWithName:"sentry-http-transport" + [[SentryDispatchQueueWrapper alloc] initWithName:"io.sentry.http-transport" attributes:attributes]; SentryNSURLRequestBuilder *requestBuilder = [[SentryNSURLRequestBuilder alloc] init]; diff --git a/Sources/Sentry/SentryWatchdogTerminationTrackingIntegration.m b/Sources/Sentry/SentryWatchdogTerminationTrackingIntegration.m index 65a8126cbd..7d62a0a16c 100644 --- a/Sources/Sentry/SentryWatchdogTerminationTrackingIntegration.m +++ b/Sources/Sentry/SentryWatchdogTerminationTrackingIntegration.m @@ -53,7 +53,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options dispatch_queue_attr_t attributes = dispatch_queue_attr_make_with_qos_class( DISPATCH_QUEUE_SERIAL, DISPATCH_QUEUE_PRIORITY_HIGH, 0); SentryDispatchQueueWrapper *dispatchQueueWrapper = - [[SentryDispatchQueueWrapper alloc] initWithName:"sentry-out-of-memory-tracker" + [[SentryDispatchQueueWrapper alloc] initWithName:"io.sentry.watchdog-termination-tracker" attributes:attributes]; SentryFileManager *fileManager = [[[SentrySDK currentHub] getClient] fileManager]; diff --git a/Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift b/Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift index b6f2db89a9..beded23fc3 100644 --- a/Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift +++ b/Sources/Swift/Helper/SentryEnabledFeaturesBuilder.swift @@ -35,6 +35,12 @@ import Foundation if options.swiftAsyncStacktraces { features.append("swiftAsyncStacktraces") } + +#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) + if options.enableAppHangTrackingV2 { + features.append("appHangTrackingV2") + } +#endif //os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) return features } diff --git a/Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift b/Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift index 1fb4f4547d..51af5c5af7 100644 --- a/Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift +++ b/Tests/SentryTests/Helper/SentryEnabledFeaturesBuilderTests.swift @@ -25,6 +25,10 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase { options.enablePreWarmedAppStartTracing = true #endif // canImport(UIKit) #endif // os(iOS) || os(tvOS) + +#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) + options.enableAppHangTrackingV2 = true +#endif //os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) let features = SentryEnabledFeaturesBuilder.getEnabledFeatures(options: options) @@ -42,5 +46,9 @@ final class SentryEnabledFeaturesBuilderTests: XCTestCase { XCTAssert(features.contains("preWarmedAppStartTracing")) #endif // canImport(UIKit) #endif // os(iOS) || os(tvOS) + +#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) + XCTAssert(features.contains("appHangTrackingV2")) +#endif //os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) } }