Skip to content

Commit 5375850

Browse files
committed
Update logging parameters
1 parent 727d4b8 commit 5375850

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

CommonHelpers/Instance.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ public static bool IsDEBUG
4646
}
4747
}
4848

49+
public static bool IsProductionBuild
50+
{
51+
get
52+
{
53+
#if PRODUCTION_BUILD
54+
return true;
55+
#else
56+
return false;
57+
#endif
58+
}
59+
}
60+
4961
public static void OnUninstall(Action action)
5062
{
5163
if (Uninstall)

CommonHelpers/Log.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ public static class Log
2020

2121
internal static void SentryOptions(Sentry.SentryOptions o)
2222
{
23+
var env = Instance.IsProductionBuild ? "prod" : "dev";
2324
var build = Instance.IsDEBUG ? "debug" : "release";
24-
var type = File.Exists("Uninstaller.exe") ? "setup" : "zip";
25+
var deploy = File.Exists("Uninstaller.exe") ? "setup" : "zip";
2526

2627
o.Dsn = Log.SENTRY_DSN;
2728
o.TracesSampleRate = 1.0;
2829
o.IsGlobalModeEnabled = true;
29-
o.Environment = String.Format("{0}:{1}_{2}", Instance.ApplicationName, build, type);
30+
o.Environment = String.Format("{0}:{1}_{2}", Instance.ApplicationName, build, deploy);
3031
o.DefaultTags.Add("App", Instance.ApplicationName);
3132
o.DefaultTags.Add("MachineID", Instance.MachineID);
32-
o.DefaultTags.Add("Build", type);
33-
o.DefaultTags.Add("Configuration", build);
33+
o.DefaultTags.Add("Build", build);
34+
o.DefaultTags.Add("Deploy", deploy);
3435

3536
var releaseVersion = typeof(Log).Assembly.GetCustomAttributes<AssemblyInformationalVersionAttribute>().FirstOrDefault();
3637
if (releaseVersion is not null)

Updater/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,12 @@ static void Run()
8686
TrackProcess("SteamController");
8787

8888
var updateURL = String.Format(
89-
"https://steam-deck-tools.ayufan.dev/docs/updates/{0}_{1}.xml?version={2}&machineID={3}",
89+
"https://steam-deck-tools.ayufan.dev/docs/updates/{0}_{1}.xml?version={2}&machineID={3}&env={4}",
9090
Instance.IsDEBUG ? "debug" : "release",
9191
IsUsingInstaller ? "setup" : "zip",
9292
HttpUtility.UrlEncode(Instance.ProductVersion),
93-
HttpUtility.UrlEncode(Instance.MachineID)
93+
HttpUtility.UrlEncode(Instance.MachineID),
94+
Instance.IsProductionBuild ? "prod" : "dev"
9495
);
9596

9697
AutoUpdater.Start(updateURL);

0 commit comments

Comments
 (0)