Created
December 13, 2019 14:52
-
-
Save aevitas/5a52a09eb981db8241797c5b7e028e46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddSingleton<MetricReporter>(); | |
services.AddControllers(); | |
} | |
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
// Other middleware components omitted for brevity | |
// Make sure these calls are made before the call to UseEndPoints. | |
app.UseMetricServer(); | |
app.UseMiddleware<ResponseMetricMiddleware>(); | |
app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment