Extra Stat collection (#407)
* Cleaned up error interceptor to avoid sending auth errors (when a 500 occurs) to sentry as auth errors aren't issues. * Added extra stat collection * Fixed a bad gitignore which ignored anything in a stats directory
This commit is contained in:
parent
b9a06d3586
commit
b11bb0e3b5
18 changed files with 64 additions and 57 deletions
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace API.DTOs
|
||||
namespace API.DTOs.Stats
|
||||
{
|
||||
public class ClientInfoDto
|
||||
{
|
||||
|
@ -16,13 +16,14 @@ namespace API.DTOs
|
|||
public DetailsVersion Os { get; set; }
|
||||
|
||||
public DateTime? CollectedAt { get; set; }
|
||||
public bool UsingDarkTheme { get; set; }
|
||||
|
||||
public bool IsTheSameDevice(ClientInfoDto clientInfoDto)
|
||||
{
|
||||
return (clientInfoDto.ScreenResolution ?? "").Equals(ScreenResolution) &&
|
||||
(clientInfoDto.PlatformType ?? "").Equals(PlatformType) &&
|
||||
(clientInfoDto.Browser?.Name ?? "").Equals(Browser?.Name) &&
|
||||
(clientInfoDto.Os?.Name ?? "").Equals(Os?.Name) &&
|
||||
return (clientInfoDto.ScreenResolution ?? string.Empty).Equals(ScreenResolution) &&
|
||||
(clientInfoDto.PlatformType ?? string.Empty).Equals(PlatformType) &&
|
||||
(clientInfoDto.Browser?.Name ?? string.Empty).Equals(Browser?.Name) &&
|
||||
(clientInfoDto.Os?.Name ?? string.Empty).Equals(Os?.Name) &&
|
||||
clientInfoDto.CollectedAt.GetValueOrDefault().ToString("yyyy-MM-dd")
|
||||
.Equals(CollectedAt.GetValueOrDefault().ToString("yyyy-MM-dd"));
|
||||
}
|
||||
|
@ -33,4 +34,4 @@ namespace API.DTOs
|
|||
public string Name { get; set; }
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
namespace API.DTOs
|
||||
namespace API.DTOs.Stats
|
||||
{
|
||||
public class ServerInfoDto
|
||||
{
|
||||
|
@ -8,5 +8,7 @@
|
|||
public string KavitaVersion { get; set; }
|
||||
public string BuildBranch { get; set; }
|
||||
public string Culture { get; set; }
|
||||
public bool IsDocker { get; set; }
|
||||
public int NumOfCores { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using API.Entities.Enums;
|
||||
|
||||
namespace API.DTOs
|
||||
namespace API.DTOs.Stats
|
||||
{
|
||||
public class UsageInfoDto
|
||||
{
|
||||
|
@ -21,4 +21,4 @@ namespace API.DTOs
|
|||
public LibraryType Type { get; set; }
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace API.DTOs
|
||||
namespace API.DTOs.Stats
|
||||
{
|
||||
public class UsageStatisticsDto
|
||||
{
|
||||
|
@ -30,4 +30,4 @@ namespace API.DTOs
|
|||
ClientsInfo.Add(clientInfoDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue