One of my previous posts was about open source application performance management, and why we even consider open source. If we were to give an open source monitoring solution a shot for an ASP.NET Core application, what options are available? One option is an open source project I’ve been working on, App Metrics. It targets .NET Standard which of course makes it a cross platform solution, provides various extensions allowing metrics to be captured in process and persisted to several TSDBs, as well as providing application health checks.
Health checks are useful to not only test the internal health of your application but also it’s external dependencies such as confirming that a third party api is available or confirming the connectivity to a database for example. App Metrics provides such health checks and exposes a health endpoint whereby results can be viewed and monitored. Health checks in App Metrics are small tests which return either a healthy, degraded or unhealthy result. Health checks are executed when the health endpoint is requested via ASP.NET Core Middleware.
Here we’ll look at configuring App Metrics to provide health checks in an ASP.NET Core MVC application.