You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the complete solution to include health checks.
Include /health and /alive checks on the Api
Add integration health checks such as database probe and redis cache, as well as the external service at https://api.weather.gov/
Explain how the WaitFor API uses health checks to determine if a resource is ready, and update the web application to wait for the API's health checks to indicate it is ready.
Include consideration for non-development environments, such as not exposing the endpoints externally or implementing request timeouts and output caching to prevent abuse or denial-of-service attacks.
Include information at the end on the HealthChecksUI sample that explains it is possible to add the UI as a container and links to the sample for those who are interested.
Include a markdown file in the format of the other workshop markdown files. Write the code sections as instructions for students who will be making these updates in the application to get it to the state of the complete code.
The text was updated successfully, but these errors were encountered:
Fixes#76
Add health checks module to the application.
* **Add Health Check Packages**: Add `Microsoft.Extensions.Diagnostics.HealthChecks`, `AspNetCore.HealthChecks.Npgsql`, and `AspNetCore.HealthChecks.Redis` package references to `complete/Api/Api.csproj`.
* **Add Health Check Services**: Add health check services for database, redis cache, and external service in `complete/Api/Program.cs`.
* **Add Health Check Endpoints**: Add health check endpoints for `/health` and `/alive` in `complete/Api/Program.cs`.
* **Considerations for Non-Development Environments**: Add considerations for non-development environments in `MapDefaultEndpoints` method in `complete/ServiceDefaults/Extensions.cs`.
* **Documentation**: Add `workshop/10-health-checks.md` to explain the health checks module and include instructions for students to update the application with health checks. Reference relevant documentation and include information on the HealthChecksUI sample.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dotnet-presentations/dotnet-aspire-workshop/issues/76?shareId=XXXX-XXXX-XXXX-XXXX).
Add a module for Health Checks.
/health
and/alive
checks on the ApiWaitFor
API uses health checks to determine if a resource is ready, and update the web application to wait for the API's health checks to indicate it is ready.The text was updated successfully, but these errors were encountered: