Skip to content

Commit

Permalink
Add global statistics context to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 11, 2022
1 parent f53d42d commit be09ec8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osu.Game/Utils/SentryLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Logging;
using osu.Framework.Statistics;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Database;
Expand Down Expand Up @@ -127,6 +128,10 @@ private void processLogEntry(LogEntry entry)
};
});

scope.Contexts[@"global statistics"] = GlobalStatistics.GetStatistics()
.GroupBy(s => s.Group)
.ToDictionary(g => g.Key, items => items.ToDictionary(i => i.Name, g => g.DisplayValue));

scope.Contexts[@"beatmap"] = new
{
Name = beatmap.ToString(),
Expand Down

0 comments on commit be09ec8

Please sign in to comment.