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:
Joseph Milazzo 2021-07-20 11:32:37 -05:00 committed by GitHub
parent b9a06d3586
commit b11bb0e3b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 64 additions and 57 deletions

View file

@ -2,7 +2,7 @@
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;
using API.DTOs;
using API.DTOs.Stats;
using Microsoft.Extensions.Logging;
namespace API.Services.Clients

View file

@ -6,7 +6,7 @@ using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using API.Data;
using API.DTOs;
using API.DTOs.Stats;
using API.Interfaces;
using API.Interfaces.Services;
using API.Services.Clients;
@ -15,7 +15,7 @@ using Kavita.Common.EnvironmentInfo;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace API.Services
namespace API.Services.Tasks
{
public class StatsService : IStatsService
{
@ -142,7 +142,9 @@ namespace API.Services
RunTimeVersion = RuntimeInformation.FrameworkDescription,
KavitaVersion = BuildInfo.Version.ToString(),
Culture = Thread.CurrentThread.CurrentCulture.Name,
BuildBranch = BuildInfo.Branch
BuildBranch = BuildInfo.Branch,
IsDocker = new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker,
NumOfCores = Environment.ProcessorCount
};
return serverInfo;