mirror of
https://github.com/ppy/osu.git
synced 2025-02-11 23:53:22 +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:
commit
c079969e72
@ -10,7 +10,7 @@
|
|||||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.115.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.129.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Fody does not handle Android build well, and warns when unchanged.
|
<!-- Fody does not handle Android build well, and warns when unchanged.
|
||||||
|
@ -233,8 +233,6 @@ namespace osu.Game
|
|||||||
|
|
||||||
forwardGeneralLogsToNotifications();
|
forwardGeneralLogsToNotifications();
|
||||||
forwardTabletLogsToNotifications();
|
forwardTabletLogsToNotifications();
|
||||||
|
|
||||||
SentryLogger = new SentryLogger(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IOverlayManager
|
#region IOverlayManager
|
||||||
@ -320,6 +318,12 @@ namespace osu.Game
|
|||||||
private readonly List<string> dragDropFiles = new List<string>();
|
private readonly List<string> dragDropFiles = new List<string>();
|
||||||
private ScheduledDelegate dragDropImportSchedule;
|
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)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
|
using osu.Framework.Platform;
|
||||||
using osu.Framework.Statistics;
|
using osu.Framework.Statistics;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
@ -36,7 +37,7 @@ namespace osu.Game.Utils
|
|||||||
|
|
||||||
private readonly OsuGame game;
|
private readonly OsuGame game;
|
||||||
|
|
||||||
public SentryLogger(OsuGame game)
|
public SentryLogger(OsuGame game, Storage? storage = null)
|
||||||
{
|
{
|
||||||
this.game = game;
|
this.game = game;
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ namespace osu.Game.Utils
|
|||||||
options.AutoSessionTracking = true;
|
options.AutoSessionTracking = true;
|
||||||
options.IsEnvironmentUser = false;
|
options.IsEnvironmentUser = false;
|
||||||
options.IsGlobalModeEnabled = true;
|
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
|
// 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)}";
|
options.Release = $"osu@{game.Version.Replace($@"-{OsuGameBase.BUILD_SUFFIX}", string.Empty)}";
|
||||||
});
|
});
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="20.1.0" />
|
<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="ppy.osu.Game.Resources" Version="2024.1224.0" />
|
||||||
<PackageReference Include="Sentry" Version="5.0.0" />
|
<PackageReference Include="Sentry" Version="5.0.0" />
|
||||||
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
||||||
|
@ -17,6 +17,6 @@
|
|||||||
<MtouchInterpreter>-all</MtouchInterpreter>
|
<MtouchInterpreter>-all</MtouchInterpreter>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.117.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.129.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user