Skip to content

Commit 83f0bba

Browse files
committed
feat: include best remote on squirrel influx metric
1 parent 8dc6bb1 commit 83f0bba

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Hearthstone Deck Tracker/Utility/Analytics/Influx.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,15 @@ public static void OnArenasmithMissingScore(bool apiError, string cardId)
420420
);
421421
}
422422

423-
public static void OnSquirrelFindBestRemote(string result)
423+
public static void OnSquirrelFindBestRemote(string result, string remote)
424424
{
425425
if(!Config.Instance.GoogleAnalytics)
426426
return;
427427
var timeZone = Regex.Escape(TimeZoneInfo.Local.Id);
428428

429429
WritePoint(new InfluxPointBuilder("hdt_squirrel_find_best_remote")
430430
.Tag("result", result)
431+
.Tag("remote", remote)
431432
.Tag("timezone", timeZone)
432433
.Build()
433434
);

Hearthstone Deck Tracker/Utility/Updating/SquirrelConnection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static async void FindBestRemote()
8383
if(!successResults.Any())
8484
{
8585
Log.Warn("Could not download any RELEASES file. Connectivity problems?");
86-
Influx.OnSquirrelFindBestRemote("ConnectivityProblems");
86+
Influx.OnSquirrelFindBestRemote("ConnectivityProblems", "None");
8787
return;
8888
}
8989
foreach(var result in results)
@@ -109,12 +109,12 @@ public static async void FindBestRemote()
109109
}
110110
Config.Save();
111111

112-
Influx.OnSquirrelFindBestRemote("Success");
112+
Influx.OnSquirrelFindBestRemote("Success", best.Remote.ToString());
113113
HSReplayNetClientAnalytics.OnSquirrelRemoteChanged(initial, (SquirrelRemote)Config.Instance.SquirrelRemote);
114114
}
115115
catch(Exception e)
116116
{
117-
Influx.OnSquirrelFindBestRemote("Error");
117+
Influx.OnSquirrelFindBestRemote("Error", "None");
118118
Log.Error(e);
119119
}
120120
}

0 commit comments

Comments
 (0)