1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-06 20:22:56 +08:00

Merge pull request #31417 from peppy/enable-sentry-caching

Enable sentry caching to avoid sentry writing outside of game directory
This commit is contained in:
Bartłomiej Dach 2025-01-29 11:19:56 +01:00 committed by GitHub
commit c079969e72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 6 deletions

View File

@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.115.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.129.1" />
</ItemGroup>
<PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged.

View File

@ -233,8 +233,6 @@ namespace osu.Game
forwardGeneralLogsToNotifications();
forwardTabletLogsToNotifications();
SentryLogger = new SentryLogger(this);
}
#region IOverlayManager
@ -320,6 +318,12 @@ namespace osu.Game
private readonly List<string> dragDropFiles = new List<string>();
private ScheduledDelegate dragDropImportSchedule;
public override void SetupLogging(Storage gameStorage, Storage cacheStorage)
{
base.SetupLogging(gameStorage, cacheStorage);
SentryLogger = new SentryLogger(this, cacheStorage);
}
public override void SetHost(GameHost host)
{
base.SetHost(host);

View File

@ -11,6 +11,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Framework.Statistics;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
@ -36,7 +37,7 @@ namespace osu.Game.Utils
private readonly OsuGame game;
public SentryLogger(OsuGame game)
public SentryLogger(OsuGame game, Storage? storage = null)
{
this.game = game;
@ -49,6 +50,7 @@ namespace osu.Game.Utils
options.AutoSessionTracking = true;
options.IsEnvironmentUser = false;
options.IsGlobalModeEnabled = true;
options.CacheDirectoryPath = storage?.GetFullPath(string.Empty);
// The reported release needs to match version as reported to Sentry in .github/workflows/sentry-release.yml
options.Release = $"osu@{game.Version.Replace($@"-{OsuGameBase.BUILD_SUFFIX}", string.Empty)}";
});

View File

@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="ppy.osu.Framework" Version="2025.117.0" />
<PackageReference Include="ppy.osu.Framework" Version="2025.129.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.1224.0" />
<PackageReference Include="Sentry" Version="5.0.0" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->

View File

@ -17,6 +17,6 @@
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.117.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.129.1" />
</ItemGroup>
</Project>