April 2018
Intermediate to advanced
300 pages
7h 41m
English
We can set up App Metrics in the ASP.NET Core application in three easy steps, which are as follows:
App Metrics can be installed as NuGet packages. Here are the two packages that can be added through NuGet in your .NET Core project:
Install-Package App.Metrics
Install-Pacakge App.Metrics.AspnetCore.Mvc
Add UseMetrics to Program.cs in the BuildWebHost method, as follows:
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseMetrics()
.UseStartup<Startup>()
.Build();
Finally, we can add a metrics resource filter in the ConfigureServices method of the Startup class as follows: ...