From dfd8ae5e0289c079c0b3eb606602f7cfcc58fbac Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Mon, 30 Sep 2024 11:34:46 +0200 Subject: [PATCH 1/3] feat(apple): Add docs for app hangs v2 Add docs for the experimental feature app hangs V2 for the Cocoa SDK. --- .../apple/common/configuration/app-hangs.mdx | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/platforms/apple/common/configuration/app-hangs.mdx b/docs/platforms/apple/common/configuration/app-hangs.mdx index 08b5ec03c7196..07974c3347cab 100644 --- a/docs/platforms/apple/common/configuration/app-hangs.mdx +++ b/docs/platforms/apple/common/configuration/app-hangs.mdx @@ -130,3 +130,59 @@ SentrySDK.resumeAppHangTracking() [SentrySDK resumeAppHangTracking]; ``` + +### App Hangs V2 + + + +This feature is experimental and may have bugs. + + + +Since version 8.37.0, you can enable AppHangsV2, which is available on iOS and tvOS. +AppHangsV2 works similarly to the prior version. The main difference is that it differentiates between app hangs, +for which the main thread is fully blocked and for which not, and you can ignore non-fully blocking app hangs. +A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. +A non-fully-blocking app hang is when the app appears stuck to the user but can still render a few frames. +Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the +main thread. As the main thread isn't completely blocked, non-fully-blocking app hangs can have a stacktrace +that doesn't highlight the exact blocking location. +To enable the feature: + +```swift {tabTitle:Swift} +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.enableAppHangTrackingV2 = true +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.enableAppHangTrackingV2 = YES; +}]; +``` + +As stacktraces might not be 100% accurate for non-fully blocked app hangs, you can disable them with the option `enableReportNonFullyBlockingAppHangs`: + +```swift {tabTitle:Swift} +import Sentry + +SentrySDK.start { options in + options.dsn = "___PUBLIC_DSN___" + options.enableReportNonFullyBlockingAppHangs = false +} +``` + +```objc {tabTitle:Objective-C} +@import Sentry; + +[SentrySDK startWithConfigureOptions:^(SentryOptions *options) { + options.dsn = @"___PUBLIC_DSN___"; + options.enableReportNonFullyBlockingAppHangs = NO; +}]; +``` From b912b2fe39c7ae80810acc1ab6d74a441737aba0 Mon Sep 17 00:00:00 2001 From: Alex Krawiec Date: Wed, 2 Oct 2024 13:40:37 -0700 Subject: [PATCH 2/3] Remove extra line breaks and add minor edits --- .../apple/common/configuration/app-hangs.mdx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/platforms/apple/common/configuration/app-hangs.mdx b/docs/platforms/apple/common/configuration/app-hangs.mdx index 07974c3347cab..5ce8c6dd1eca5 100644 --- a/docs/platforms/apple/common/configuration/app-hangs.mdx +++ b/docs/platforms/apple/common/configuration/app-hangs.mdx @@ -139,14 +139,8 @@ This feature is experimental and may have bugs. -Since version 8.37.0, you can enable AppHangsV2, which is available on iOS and tvOS. -AppHangsV2 works similarly to the prior version. The main difference is that it differentiates between app hangs, -for which the main thread is fully blocked and for which not, and you can ignore non-fully blocking app hangs. -A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. -A non-fully-blocking app hang is when the app appears stuck to the user but can still render a few frames. -Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the -main thread. As the main thread isn't completely blocked, non-fully-blocking app hangs can have a stacktrace -that doesn't highlight the exact blocking location. +Since version 8.37.0, you can now enable AppHangsV2, which is available on iOS and tvOS. The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs which you might choose to ignore. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked. + To enable the feature: ```swift {tabTitle:Swift} @@ -167,7 +161,7 @@ SentrySDK.start { options in }]; ``` -As stacktraces might not be 100% accurate for non-fully blocked app hangs, you can disable them with the option `enableReportNonFullyBlockingAppHangs`: +As stacktraces might not be 100% accurate for non-fully-blocking app hangs, you can disable them with the option `enableReportNonFullyBlockingAppHangs`: ```swift {tabTitle:Swift} import Sentry From 02b23ff2dabb04c32d94dc86bf87dd491eff530a Mon Sep 17 00:00:00 2001 From: Philipp Hofmann Date: Thu, 3 Oct 2024 14:27:49 +0200 Subject: [PATCH 3/3] Update docs/platforms/apple/common/configuration/app-hangs.mdx Co-authored-by: Liza Mock --- docs/platforms/apple/common/configuration/app-hangs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/apple/common/configuration/app-hangs.mdx b/docs/platforms/apple/common/configuration/app-hangs.mdx index 5ce8c6dd1eca5..b4b6f18c335f3 100644 --- a/docs/platforms/apple/common/configuration/app-hangs.mdx +++ b/docs/platforms/apple/common/configuration/app-hangs.mdx @@ -139,7 +139,7 @@ This feature is experimental and may have bugs. -Since version 8.37.0, you can now enable AppHangsV2, which is available on iOS and tvOS. The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs which you might choose to ignore. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked. +As of version 8.37.0, you can enable AppHangsV2, which is available on iOS and tvOS. The main difference is that AppHangsV2 differentiates between fully-blocking and non-fully-blocking app hangs, which you might choose to ignore. A fully-blocking app hang is when the main thread is stuck completely, and the app can't render a single frame. A non-fully-blocking app hang is when the app appears stuck to the user, but can still render a few frames. Fully-blocking app hangs are more actionable because the stacktrace shows the exact blocking location on the main thread. Non-fully-blocking app hangs can have a stacktrace that doesn't highlight the exact blocking location, since the main thread isn't completely blocked. To enable the feature: