mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add Sentry integration
This commit is contained in:
parent
949c1f6b67
commit
a1749098f4
2 changed files with 19 additions and 0 deletions
|
|
@ -39,6 +39,7 @@
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
|
||||||
<PackageReference Include="Samboy063.Tomlet" Version="5.0.1" />
|
<PackageReference Include="Samboy063.Tomlet" Version="5.0.1" />
|
||||||
|
<PackageReference Include="Sentry" Version="3.29.1" />
|
||||||
<PackageReference Include="SingleFileExtractor.Core" Version="1.0.1" />
|
<PackageReference Include="SingleFileExtractor.Core" Version="1.0.1" />
|
||||||
<PackageReference Include="starksoft.aspen" Version="1.1.8">
|
<PackageReference Include="starksoft.aspen" Version="1.1.8">
|
||||||
<NoWarn>NU1701</NoWarn>
|
<NoWarn>NU1701</NoWarn>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ using MinecraftClient.Protocol.Session;
|
||||||
using MinecraftClient.Scripting;
|
using MinecraftClient.Scripting;
|
||||||
using MinecraftClient.WinAPI;
|
using MinecraftClient.WinAPI;
|
||||||
using Tomlet;
|
using Tomlet;
|
||||||
|
using Sentry;
|
||||||
using static MinecraftClient.Settings;
|
using static MinecraftClient.Settings;
|
||||||
using static MinecraftClient.Settings.ConsoleConfigHealper.ConsoleConfig;
|
using static MinecraftClient.Settings.ConsoleConfigHealper.ConsoleConfig;
|
||||||
using static MinecraftClient.Settings.MainConfigHealper.MainConfig.AdvancedConfig;
|
using static MinecraftClient.Settings.MainConfigHealper.MainConfig.AdvancedConfig;
|
||||||
|
|
@ -287,6 +288,23 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sentry integration
|
||||||
|
if (BuildInfo != null)
|
||||||
|
{
|
||||||
|
if (Config.Logging.DebugMessages) // TODO: Add setting to let user disable telemetry
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLine("Telemetry is enabled. Crash report will be sent to Sentry");
|
||||||
|
using (SentrySdk.Init(o =>
|
||||||
|
{
|
||||||
|
// Maybe don't hardcode the url? Add it during building?
|
||||||
|
o.Dsn = "https://41fdd209ee704cda8f0e8deb37ce48da@o4504977948672000.ingest.sentry.io/4504977964335104";
|
||||||
|
o.Release = BuildInfo ?? "Development Build";
|
||||||
|
o.TracesSampleRate = 1.0;
|
||||||
|
o.IsGlobalModeEnabled = true;
|
||||||
|
})) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
||||||
{
|
{
|
||||||
InternalConfig.Username = "New Window";
|
InternalConfig.Username = "New Window";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue