1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 02:32:55 +08:00

Add beatmap context to sentry

This commit is contained in:
Dean Herbert 2022-05-11 14:11:20 +09:00
parent b136677bb0
commit 977a0453cc

View File

@ -10,6 +10,7 @@ using System.Net;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays;
@ -105,6 +106,15 @@ namespace osu.Game.Utils
Game = game.Dependencies.Get<OsuConfigManager>().GetLoggableState()
// TODO: add framework config here. needs some consideration on how to expose.
};
var beatmap = game.Dependencies.Get<IBindable<WorkingBeatmap>>().Value.BeatmapInfo;
scope.Contexts[@"beatmap"] = new
{
Name = beatmap.ToString(),
beatmap.OnlineID,
};
scope.Contexts[@"clocks"] = new
{
Audio = game.Dependencies.Get<MusicController>().CurrentTrack.CurrentTime,