From a5886d200fc762ab43dfe70d680861aeac37f253 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Wed, 20 May 2020 23:58:51 +0800 Subject: [PATCH] collect portable mode --- Wox.Infrastructure/Exception/ExceptionFormatter.cs | 2 ++ Wox/Helper/ErrorReporting.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Wox.Infrastructure/Exception/ExceptionFormatter.cs b/Wox.Infrastructure/Exception/ExceptionFormatter.cs index 904be0770..707e91e40 100644 --- a/Wox.Infrastructure/Exception/ExceptionFormatter.cs +++ b/Wox.Infrastructure/Exception/ExceptionFormatter.cs @@ -7,6 +7,7 @@ using System.Windows; using System.Xml; using Microsoft.Win32; +using Wox.Infrastructure.UserSettings; namespace Wox.Infrastructure.Exception { @@ -141,6 +142,7 @@ public static string RuntimeInfo() StringBuilder sb = new StringBuilder(); sb.AppendLine("## Runtime Info"); sb.AppendLine($"* Command Line: {Environment.CommandLine}"); + sb.AppendLine($"* Portable Mode: {DataLocation.PortableDataLocationInUse()}"); sb.AppendLine($"* Timestamp: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}"); sb.AppendLine($"* Wox version: {Constant.Version}"); sb.AppendLine($"* OS Version: {Environment.OSVersion.VersionString}"); diff --git a/Wox/Helper/ErrorReporting.cs b/Wox/Helper/ErrorReporting.cs index 65b7e3707..4dd711fe6 100644 --- a/Wox/Helper/ErrorReporting.cs +++ b/Wox/Helper/ErrorReporting.cs @@ -11,6 +11,7 @@ using Sentry.Protocol; using Wox.Infrastructure; using Wox.Infrastructure.Exception; +using Wox.Infrastructure.UserSettings; namespace Wox.Helper { @@ -64,8 +65,12 @@ public static IDisposable InitializedSentry(string systemLanguage) }); SentrySdk.ConfigureScope(scope => { + scope.SetExtra("commandLine", Environment.CommandLine); + scope.SetExtra("portableMode", DataLocation.PortableDataLocationInUse()); scope.SetTag("systemLanguage", systemLanguage); scope.SetTag("timezone", TimeZoneInfo.Local.DisplayName); + scope.SetExtra("x64OS", Environment.Is64BitOperatingSystem); + scope.SetExtra("x64Process", Environment.Is64BitProcess); }); return s; }