✨ Add Prometheus
This commit is contained in:
@ -29,6 +29,7 @@ using Microsoft.Extensions.Options;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using NodaTime;
|
||||
using NodaTime.Serialization.SystemTextJson;
|
||||
using Prometheus;
|
||||
using Quartz;
|
||||
using StackExchange.Redis;
|
||||
using tusdotnet;
|
||||
@ -46,6 +47,11 @@ builder.WebHost.ConfigureKestrel(options =>
|
||||
options.Limits.RequestHeadersTimeout = TimeSpan.FromSeconds(30);
|
||||
});
|
||||
|
||||
// Configure metrics
|
||||
|
||||
builder.Services.UseHttpClientMetrics();
|
||||
builder.Services.AddHealthChecks();
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddLocalization(options => options.ResourcesPath = "Resources");
|
||||
@ -236,6 +242,7 @@ using (var scope = app.Services.CreateScope())
|
||||
await db.Database.MigrateAsync();
|
||||
}
|
||||
|
||||
app.MapMetrics();
|
||||
app.MapOpenApi();
|
||||
|
||||
app.UseSwagger();
|
||||
|
Reference in New Issue
Block a user