mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
add metrics to each shard
This commit is contained in:
parent
33a134608a
commit
5c9b15545c
3 changed files with 23 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ public class Startup
|
|||
|
||||
bool isSecondary = mareSettings.GetValue<bool>("IsSecondaryInstance", false);
|
||||
|
||||
//services.AddControllers();
|
||||
|
||||
var defaultMethodConfig = new MethodConfig
|
||||
{
|
||||
Names = { MethodName.Default },
|
||||
|
|
@ -52,6 +54,10 @@ public class Startup
|
|||
{
|
||||
services.AddSingleton(new MareMetrics(new List<string>
|
||||
{
|
||||
MetricsAPI.CounterAuthenticationCacheHits,
|
||||
MetricsAPI.CounterAuthenticationFailures,
|
||||
MetricsAPI.CounterAuthenticationRequests,
|
||||
MetricsAPI.CounterAuthenticationSuccesses
|
||||
}, new List<string>
|
||||
{
|
||||
MetricsAPI.GaugeFilesTotalSize,
|
||||
|
|
@ -113,6 +119,7 @@ public class Startup
|
|||
app.UseEndpoints(e =>
|
||||
{
|
||||
e.MapGrpcService<FileService>();
|
||||
//e.MapControllers();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue