wabbajack/Wabbajack.Common/Metrics.cs

29 lines
781 B
C#
Raw Normal View History

2019-12-15 04:33:48 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace Wabbajack.Common
{
public class Metrics
{
/// <summary>
/// This is all we track for metrics, action, and value. The action will be like
/// "downloaded", the value "Joe's list".
/// </summary>
/// <param name="action"></param>
/// <param name="value"></param>
2019-12-15 05:04:02 +00:00
public static async Task Send(string action, string value)
2019-12-15 04:33:48 +00:00
{
var client = new HttpClient();
try
{
2019-12-15 05:04:02 +00:00
await client.GetAsync($"http://build.wabbajack.org/metrics/{action}/{value}");
2019-12-15 04:33:48 +00:00
}
catch (Exception) { }
}
}
}