Skip to content

Commit

Permalink
Add screen stack context to sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed May 11, 2022
1 parent c61d0ff commit 843e13a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions osu.Game/OsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
using osu.Game.Users;
using osu.Game.Utils;
using osuTK.Graphics;
using Sentry;
using Logger = osu.Framework.Logging.Logger;

namespace osu.Game
{
Expand Down Expand Up @@ -1197,6 +1199,15 @@ protected override void UpdateAfterChildren()

private void screenChanged(IScreen current, IScreen newScreen)
{
SentrySdk.ConfigureScope(scope =>
{
scope.Contexts[@"screen stack"] = new
{
Current = newScreen.GetType().Name,
Previous = current.GetType().Name,
};
});

switch (newScreen)
{
case IntroScreen intro:
Expand Down

0 comments on commit 843e13a

Please sign in to comment.