Reporting & Visualization
There are several TSDB reporting extensions which App Metrics provides, see the Reporting Extensions menu on the left.
App Metrics does not include a visualization tool, Grafana already does an amazing job of this supporting the most popular Timeseries Databases (TSBDs) available.
Reporting from an ASP.NET Core Web Application
First head over to the documentation on web monitoring and review how to configure the reporter for your chosen TSDB.
Next, to run the reporter in a web application, the UseMetricsReporting
extention method on the IApplicationBuilder
can be used as show below.
The extension methods takes the IApplicationLifetime
instance which is used to run reporting after the application has successfully started up and uses the lifetime.ApplicationStopping
cancellation token to gracefully end reporting on application shutdown.
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Configure...
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IApplicationLifetime lifetime)
{
app.UseMetrics();
app.UseMetricsReporting(lifetime);
}
}