mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 14:24:15 +01:00
add some file statistics metrics
This commit is contained in:
parent
ea344468f2
commit
7d3297e1e8
4 changed files with 122 additions and 24 deletions
|
|
@ -51,7 +51,7 @@ public class Startup
|
|||
}
|
||||
};
|
||||
|
||||
services.AddSingleton<MareMetrics>(m => new MareMetrics(m.GetService<ILogger<MareMetrics>>(), new List<string>
|
||||
services.AddSingleton(m => new MareMetrics(m.GetService<ILogger<MareMetrics>>(), new List<string>
|
||||
{
|
||||
MetricsAPI.CounterAuthenticationCacheHits,
|
||||
MetricsAPI.CounterAuthenticationFailures,
|
||||
|
|
@ -60,8 +60,15 @@ public class Startup
|
|||
}, new List<string>
|
||||
{
|
||||
MetricsAPI.GaugeFilesTotalSize,
|
||||
MetricsAPI.GaugeFilesTotal
|
||||
MetricsAPI.GaugeFilesTotal,
|
||||
MetricsAPI.GaugeFilesUniquePastDay,
|
||||
MetricsAPI.GaugeFilesUniquePastDaySize,
|
||||
MetricsAPI.GaugeFilesUniquePastHour,
|
||||
MetricsAPI.GaugeFilesUniquePastHourSize
|
||||
}));
|
||||
services.AddSingleton<FileStatisticsService>();
|
||||
|
||||
services.AddHostedService(m => m.GetService<FileStatisticsService>());
|
||||
services.AddHostedService<CleanupService>();
|
||||
|
||||
services.AddSingleton<SecretKeyAuthenticatorService>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue