diff --git a/samples/unity-of-bugs/Assets/Resources/Sentry/SentryOptions.asset b/samples/unity-of-bugs/Assets/Resources/Sentry/SentryOptions.asset index e504483b4..ad1d8593e 100644 --- a/samples/unity-of-bugs/Assets/Resources/Sentry/SentryOptions.asset +++ b/samples/unity-of-bugs/Assets/Resources/Sentry/SentryOptions.asset @@ -17,7 +17,7 @@ MonoBehaviour: k__BackingField: 1 k__BackingField: 0 k__BackingField: 0 - k__BackingField: 0 + k__BackingField: 1 k__BackingField: 1 k__BackingField: 30000 k__BackingField: diff --git a/src/Sentry.Unity.Editor/AutoInstrumentation/SentryPerformanceAutoInstrumentation.cs b/src/Sentry.Unity.Editor/AutoInstrumentation/SentryPerformanceAutoInstrumentation.cs index fbac07006..2d20711eb 100644 --- a/src/Sentry.Unity.Editor/AutoInstrumentation/SentryPerformanceAutoInstrumentation.cs +++ b/src/Sentry.Unity.Editor/AutoInstrumentation/SentryPerformanceAutoInstrumentation.cs @@ -22,7 +22,7 @@ public void OnPostBuildPlayerScriptDLLs(BuildReport report) } var logger = options.DiagnosticLogger ?? new UnityLogger(options); - if (options.TracesSampleRate <= 0.0f || !options.PerformanceAutoInstrumentation) + if (options.TracesSampleRate <= 0.0f || !options.PerformanceAutoInstrumentationEnabled) { logger.LogInfo("Performance Auto Instrumentation has been disabled."); return; diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs index 2def8f059..82901b556 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/CoreTab.cs @@ -43,10 +43,10 @@ internal static void Display(ScriptableSentryUnityOptions options) EditorGUI.BeginDisabledGroup(options.TracesSampleRate <= 0); GUILayout.Label("Experimental", EditorStyles.boldLabel); - options.PerformanceAutoInstrumentation = EditorGUILayout.Toggle( + options.PerformanceAutoInstrumentationEnabled = EditorGUILayout.Toggle( new GUIContent("Auto Instrumentation", "To create transaction and spans automatically, " + "the SDK will modify the compiled assembly during a post build step."), - options.PerformanceAutoInstrumentation); + options.PerformanceAutoInstrumentationEnabled); EditorGUI.EndDisabledGroup(); } diff --git a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs index 35f94740f..5894d1a76 100644 --- a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs +++ b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs @@ -30,8 +30,7 @@ public static string GetConfigPath(string? notDefaultConfigName = null) [field: SerializeField] public bool EnableLogDebouncing { get; set; } = false; [field: SerializeField] public double TracesSampleRate { get; set; } = 0; - // TODO rename to PerformanceAutoInstrumentationEnabled to align with the rest of the boolean options below - [field: SerializeField] public bool PerformanceAutoInstrumentation { get; set; } = false; + [field: SerializeField] public bool PerformanceAutoInstrumentationEnabled { get; set; } = false; [field: SerializeField] public bool AutoSessionTracking { get; set; } = true; @@ -136,7 +135,7 @@ internal SentryUnityOptions ToSentryUnityOptions(bool isBuilding, ISentryUnityIn MacosNativeSupportEnabled = MacosNativeSupportEnabled, LinuxNativeSupportEnabled = LinuxNativeSupportEnabled, Il2CppLineNumberSupportEnabled = Il2CppLineNumberSupportEnabled, - PerformanceAutoInstrumentationEnabled = PerformanceAutoInstrumentation, + PerformanceAutoInstrumentationEnabled = PerformanceAutoInstrumentationEnabled, }; if (!string.IsNullOrWhiteSpace(ReleaseOverride))