From the course: ASP.NET Core: Health Checks and Logging
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Solution: Add a health check to the sample app - ASP.NET Core Tutorial
From the course: ASP.NET Core: Health Checks and Logging
Solution: Add a health check to the sample app
(upbeat music) - [Instructor] So far, we have only worked with one API endpoint in our API. In our product controller, the big get method, which as the name suggests retrieves all of the products from the database. That's not the best way to test whether the API is alive or not. Because it hits the database. And we have an extra health check for the database anyway. And well, it takes some time and resources. However, the endpoint for a health check for an API, it needs to be efficient. It shouldn't hit the system hard. And therefore, I'm just adding a new controller for exactly that purpose. So new controller. I'm using an API controller. And actually, I used the template which scaffolds me a little bit of the infrastructure. And I just call this the alive controller. And in the alive controller, which I would like to access via slash alive. I just have a get method. But it doesn't return list of strings. It…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Health checks explained1m 20s
-
(Locked)
Configuring health checks2m 33s
-
(Locked)
Adding health checks4m 31s
-
(Locked)
Adding database health checks7m 12s
-
(Locked)
Creating a UI8m 10s
-
(Locked)
Securing health check endpoints6m 42s
-
(Locked)
Challenge: Add a health check to the sample app1m 5s
-
(Locked)
Solution: Add a health check to the sample app7m 39s
-
(Locked)
Summary of health checks1m 28s
-
(Locked)