diff --git a/CHANGELOG.md b/CHANGELOG.md index f499b54eb..a8b16010c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes +- The configuration window's tooltips and help boxes and the option docs describe the SDK's defaults and requirements correctly: `Auto Set UserName` is disabled by default, `Attach Screenshots` also attaches screenshots to events on background threads, `Org Slug` is required unless the Auth Token is an organization token, `Scene Traces` has no Unity version requirement, and `IosWatchdogTerminationIntegrationEnabled` turns on reporting of watchdog terminations on iOS. ([#2933](https://github.com/getsentry/sentry-unity/pull/2933)) - The SDK no longer throws a `NullReferenceException` during startup on Android and iOS when it can't load its options, for example when the configuration lives in an OBB file that isn't available yet. ([#2931](https://github.com/getsentry/sentry-unity/pull/2931)) - Setting `FilterBadGatewayExceptions` to `false` now takes effect when initializing the SDK in code with `SentrySdk.Init`. ([#2930](https://github.com/getsentry/sentry-unity/pull/2930)) - The Event Sample Rate in the Sentry window now accepts values from 0.01 to 1.0. A rate of 0 made the SDK fail to initialize and builds fail to load the options. ([#2929](https://github.com/getsentry/sentry-unity/pull/2929)) @@ -231,7 +232,7 @@ ### Features -- Added `options.AndroidNativeTombstoneEnabled` (default `false`) and `options.AndroidReportHistoricalTombstones` (default `false`) to enable reporting of native crashes captured by Android's `ApplicationExitInfo` API as Tombstones ([#2749](https://github.com/getsentry/sentry-unity/pull/2749)) +- Added `options.AndroidTombstoneEnabled` (default `false`) and `options.AndroidReportHistoricalTombstones` (default `false`) to enable reporting of native crashes captured by Android's `ApplicationExitInfo` API as Tombstones ([#2749](https://github.com/getsentry/sentry-unity/pull/2749)) ### Fixes diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs index 1d2940afb..15efb1abd 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs @@ -200,17 +200,13 @@ internal static void Display(ScriptableSentryUnityOptions options, SentryCliOpti "constructed exception. Capture a thrown exception to include its stack trace.", MessageType.Info); - if (!SentryUnityVersion.IsNewerOrEqualThan("2020.3")) - { - EditorGUILayout.HelpBox("The IL2CPP line number feature is supported from Unity version 2020.3 or newer and 2021.3 or newer onwards", MessageType.Warning); - } - else if (cliOptions is not null && !cliOptions.IsValid(null, EditorUserBuildSettings.development)) + if (cliOptions is not null && !cliOptions.IsValid(null, EditorUserBuildSettings.development)) { EditorGUILayout.BeginVertical(EditorStyles.helpBox); var errorIcon = EditorGUIUtility.IconContent("console.erroricon").image; var content = new GUIContent("The IL2CPP line number support relies on the Debug Symbol Upload to be enabled and configured." + - "\nAdditionally, this requires an Auth Token, an Org-Slug and the Project Name." + + "\nAdditionally, this requires an Auth Token and the Project Name, and the Org Slug unless the token is an organization token." + "\nLearn more about how our IL2CPP support works in our docs.", errorIcon); EditorGUILayout.LabelField(content, EditorStyles.wordWrappedLabel); diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs index f3fa06817..9ac4663cb 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs @@ -90,7 +90,7 @@ internal static void Display(ScriptableSentryUnityOptions options) options.AutoSceneLoadTraces = EditorGUILayout.Toggle( new GUIContent("Scene Traces ", "Whether the SDK should automatically create traces " + - "during scene loading. Requires Unity 2020.3 or newer."), + "during scene loading."), options.AutoSceneLoadTraces); options.AutoAwakeTraces = EditorGUILayout.Toggle( diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/DebugSymbolsTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/DebugSymbolsTab.cs index a1d9dd38f..1a13b91c6 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/DebugSymbolsTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/DebugSymbolsTab.cs @@ -32,13 +32,13 @@ internal static void Display(SentryCliOptions cliOptions) new GUIContent( "Auth Token", cliOptions.UploadSymbols && string.IsNullOrWhiteSpace(cliOptions.Auth) ? SentryWindow.ErrorIcon : null, - "The authorization token from your user settings in Sentry"), + "The auth token sentry-cli uses to upload debug symbols, e.g. an organization token from your organization's settings in Sentry"), cliOptions.Auth); cliOptions.Organization = EditorGUILayout.TextField( new GUIContent( "Org Slug", - "The organization slug in Sentry"), + "The organization slug in Sentry. Required unless the Auth Token is an organization token."), cliOptions.Organization); cliOptions.Project = EditorGUILayout.TextField( diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/EnrichmentTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/EnrichmentTab.cs index 0d5a29783..fa88cc460 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/EnrichmentTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/EnrichmentTab.cs @@ -18,8 +18,7 @@ internal static void Display(ScriptableSentryUnityOptions options) options.IsEnvironmentUser = EditorGUILayout.Toggle( new GUIContent("Auto Set UserName", "Whether to report the 'Environment.UserName' as " + - "the User affected in the event. Defaults to enabled on desktop " + - "platforms and disabled on mobile and console platforms."), + "the User affected in the event. Disabled by default."), options.IsEnvironmentUser); EditorGUI.indentLevel--; @@ -34,8 +33,11 @@ internal static void Display(ScriptableSentryUnityOptions options) options.AttachScreenshot = EditorGUILayout.BeginToggleGroup( new GUIContent("Attach Screenshots to Events", "Try to attach current screenshot on events.\n" + "This is an early-access feature and may not work on all platforms (it is explicitly disabled on WebGL).\n" + - "Additionally, the screenshot is captured mid-frame, when an event happens, so it may be incomplete.\n" + - "A screenshot might not be able to be attached, for example when the error happens on a background thread."), + "For C# events, the screenshot is taken at the end of the current or next frame, and none is " + + "attached in the Editor or in batch mode. It is missing when no frame completes within a second, " + + "for example while the main thread hangs or the app is paused in the background.\n" + + "On Windows, with native support enabled, native crashes get a screenshot of the game's window, taken by the " + + "native SDK when the crash happens (not in batch mode or server builds)."), options.AttachScreenshot); EditorGUI.indentLevel++; diff --git a/src/Sentry.Unity.Editor/SentryCliOptionsEditor.cs b/src/Sentry.Unity.Editor/SentryCliOptionsEditor.cs index b3e47280e..25e4d4c47 100644 --- a/src/Sentry.Unity.Editor/SentryCliOptionsEditor.cs +++ b/src/Sentry.Unity.Editor/SentryCliOptionsEditor.cs @@ -16,8 +16,8 @@ public override void OnInspectorGUI() EditorGUILayout.Toggle("Enable Symbols Upload", cliOptions.UploadSymbols); EditorGUILayout.Toggle("Enable Dev Symbols Upload", cliOptions.UploadDevelopmentSymbols); - EditorGUILayout.TextField("Auth-Token", cliOptions.Auth); - EditorGUILayout.TextField("Org-Slug", cliOptions.Organization); + EditorGUILayout.TextField("Auth Token", cliOptions.Auth); + EditorGUILayout.TextField("Org Slug", cliOptions.Organization); EditorGUILayout.TextField("Project Name", cliOptions.Project); EditorGUILayout.LabelField("Options Configuration", EditorStyles.boldLabel); diff --git a/src/Sentry.Unity/SentryUnityOptions.cs b/src/Sentry.Unity/SentryUnityOptions.cs index 667f02300..2d81814d6 100644 --- a/src/Sentry.Unity/SentryUnityOptions.cs +++ b/src/Sentry.Unity/SentryUnityOptions.cs @@ -228,7 +228,8 @@ public sealed class SentryUnityOptions : SentryOptions public bool IosNativeSupportEnabled { get; set; } = true; /// - /// Whether the SDK should add native support for iOS + /// Whether the SDK should report watchdog terminations on iOS: the app getting killed by the operating system, + /// for example for using too much memory. This is disabled by default. /// public bool IosWatchdogTerminationIntegrationEnabled { get; set; } = false;