Add metrics
This commit is contained in:
@ -48,5 +48,6 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Nostr.Client" Version="1.4.2" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -10,6 +10,7 @@ using NostrStreamer.Services.Background;
|
||||
using NostrStreamer.Services.Dvr;
|
||||
using NostrStreamer.Services.StreamManager;
|
||||
using NostrStreamer.Services.Thumbnail;
|
||||
using Prometheus;
|
||||
|
||||
namespace NostrStreamer;
|
||||
|
||||
@ -82,10 +83,14 @@ internal static class Program
|
||||
await db.Database.MigrateAsync();
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
app.UseCors(o => o.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin());
|
||||
app.UseHttpMetrics();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapRazorPages();
|
||||
app.MapControllers();
|
||||
app.MapMetrics();
|
||||
|
||||
await app.RunAsync();
|
||||
}
|
||||
|
Reference in New Issue
Block a user