mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-26 02:04:22 +01:00
Allow to overwrite Sentry DSN
This commit is contained in:
parent
4d570c30d6
commit
0e8946d79f
|
|
@ -164,8 +164,14 @@ namespace CommonHelpers
|
|||
}
|
||||
}
|
||||
|
||||
public static void WithSentry(Action action)
|
||||
public static void WithSentry(Action action, string? dsn = null)
|
||||
{
|
||||
// Overwrite DSN
|
||||
if (dsn != null)
|
||||
{
|
||||
Log.SENTRY_DSN = dsn;
|
||||
}
|
||||
|
||||
using (Sentry.SentrySdk.Init(Log.SentryOptions))
|
||||
{
|
||||
action();
|
||||
|
|
@ -227,17 +233,16 @@ namespace CommonHelpers
|
|||
updateTimer.Start();
|
||||
}
|
||||
|
||||
Sentry.SentrySdk.CaptureMessage("Updater: " + ApplicationName, scope =>
|
||||
{
|
||||
scope.SetTag("type", user ? "user" : "background");
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = "Updater.exe",
|
||||
ArgumentList = { user ? "-user" : "-first" },
|
||||
ArgumentList = {
|
||||
user ? "-user" : "-first",
|
||||
"-app", ApplicationName,
|
||||
"-version", ProductVersion
|
||||
},
|
||||
UseShellExecute = false
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace CommonHelpers
|
|||
{
|
||||
public static class Log
|
||||
{
|
||||
internal const String SENTRY_DSN = "https://a6f1925b30fe43529aa7cefd0af7b8a4@o37791.ingest.sentry.io/4504316313993216";
|
||||
internal static String SENTRY_DSN = "https://a6f1925b30fe43529aa7cefd0af7b8a4@o37791.ingest.sentry.io/4504316313993216";
|
||||
|
||||
#if DEBUG
|
||||
private static bool LogToTrace = true;
|
||||
|
|
|
|||
|
|
@ -29,3 +29,4 @@
|
|||
- Fix `Use X360 with Steam` that was broken with `0.5.33`
|
||||
- Add `Sentry` error tracking (updated)
|
||||
- Tune `PowerControl` key repeats
|
||||
- Improve `Sentry` integration to reduce amount of data being sent
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace Updater
|
|||
public const String Title = "Steam Deck Tools";
|
||||
public const String RunPrefix = "-run=";
|
||||
public const String UpdatedArg = "-updated";
|
||||
public const String UPDATER_SENTRY_DSN = "https://a41ee1b3a3294d38887e6f43627f5853@o4504326877216768.ingest.sentry.io/4504326879641600";
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
|
|
@ -22,7 +23,7 @@ namespace Updater
|
|||
Instance.WithSentry(() =>
|
||||
{
|
||||
Run();
|
||||
});
|
||||
}, UPDATER_SENTRY_DSN);
|
||||
}
|
||||
|
||||
static void Run()
|
||||
|
|
@ -53,6 +54,11 @@ namespace Updater
|
|||
|
||||
Instance.RunOnce(null, "Global\\SteamDeckToolsAutoUpdater");
|
||||
|
||||
Sentry.SentrySdk.CaptureMessage("Updater", scope =>
|
||||
{
|
||||
scope.SetExtra("args", Environment.GetCommandLineArgs());
|
||||
});
|
||||
|
||||
var persistence = new RegistryPersistenceProvider(@"Software\SteamDeckTools\AutoUpdater");
|
||||
|
||||
if (userCheck || cmdLine)
|
||||
|
|
@ -85,7 +91,7 @@ namespace Updater
|
|||
TrackProcess("SteamController");
|
||||
|
||||
var updateURL = String.Format(
|
||||
"https://steam-deck-tools.ayufan.dev/updates/{0}_{1}.xml?version={2}&machineID={3}",
|
||||
"https://steam-deck-tools.ayufan.dev/docs/updates/{0}_{1}.xml?version={2}&machineID={3}",
|
||||
Instance.IsDEBUG ? "debug" : "release",
|
||||
IsUsingInstaller ? "setup" : "zip",
|
||||
HttpUtility.UrlEncode(Instance.ProductVersion),
|
||||
|
|
|
|||
Loading…
Reference in a new issue