forked from extern/FakeRelay
make metrics optional
This commit is contained in:
parent
2f587072ce
commit
900db191e8
@ -49,9 +49,13 @@ app.MapControllerRoute(
|
||||
"default",
|
||||
"{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
var useMetrics = builder.Configuration.GetValue<bool?>("EXPOSE_METRICS");
|
||||
if (useMetrics == true)
|
||||
{
|
||||
endpoints.MapMetrics();
|
||||
});
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapMetrics();
|
||||
});
|
||||
}
|
||||
|
||||
app.Run();
|
||||
|
Loading…
Reference in New Issue
Block a user