From bc294b81575b92a878c733ec9fe121cd93675ae7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 17 May 2022 12:53:13 +0900 Subject: [PATCH] Add sentry tags for operating system and processor count These would usually be in the log header, but right now that's not conveyed. An example use case would be better understanding https://sentry.ppy.sh/organizations/ppy/issues/846/?project=2&query=is%3Aunresolved&sort=freq&statsPeriod=14d, where we currently don't know whether it is a desktop or mobile OS. --- osu.Game/Utils/SentryLogger.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Utils/SentryLogger.cs b/osu.Game/Utils/SentryLogger.cs index 5390c666ed..137bf7e0aa 100644 --- a/osu.Game/Utils/SentryLogger.cs +++ b/osu.Game/Utils/SentryLogger.cs @@ -8,6 +8,7 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Net; +using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Logging; @@ -160,6 +161,8 @@ namespace osu.Game.Utils }; scope.SetTag(@"ruleset", ruleset.ShortName); + scope.SetTag(@"os", $"{RuntimeInfo.OS} ({Environment.OSVersion})"); + scope.SetTag(@"processor count", Environment.ProcessorCount.ToString()); }); } else