Добавил метрики
This commit is contained in:
@@ -10,6 +10,7 @@ using Microsoft.AspNetCore.HttpOverrides;
|
|||||||
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
using Microsoft.AspNetCore.Mvc.ApplicationParts;
|
||||||
using SfeduSchedule.Auth;
|
using SfeduSchedule.Auth;
|
||||||
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
using Prometheus;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
@@ -250,10 +251,15 @@ if (string.IsNullOrEmpty(preinstalledJwtToken))
|
|||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
|
|
||||||
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
app.UseRouting();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.UseStaticFiles();
|
app.UseHttpMetrics();
|
||||||
|
app.UseRateLimiter();
|
||||||
|
|
||||||
app.MapGet("/", async context =>
|
app.MapGet("/", async context =>
|
||||||
{
|
{
|
||||||
@@ -269,6 +275,4 @@ foreach (var p in loadedPlugins)
|
|||||||
p.Instance.MapEndpoints(app);
|
p.Instance.MapEndpoints(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseRateLimiter();
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<PackageReference Include="Ical.Net" Version="5.1.0" />
|
<PackageReference Include="Ical.Net" Version="5.1.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Web" Version="3.14.0" />
|
<PackageReference Include="Microsoft.Identity.Web" Version="3.14.0" />
|
||||||
<PackageReference Include="Microsoft.Playwright" Version="1.55.0" />
|
<PackageReference Include="Microsoft.Playwright" Version="1.55.0" />
|
||||||
<PackageReference Include="Quartz.AspNetCore" Version="3.15.0" />
|
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.4" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.4" />
|
||||||
<PackageReference Include="X.Extensions.Logging.Telegram" Version="2.0.2" />
|
<PackageReference Include="X.Extensions.Logging.Telegram" Version="2.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user