-
Notifications
You must be signed in to change notification settings - Fork 159
Add comprehensive AppHost resource health checks documentation with enhanced overview #4310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: DamianEdwards <[email protected]>
Co-authored-by: DamianEdwards <[email protected]>
Co-authored-by: DamianEdwards <[email protected]>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot The overview of this page should mention that health checks run in the app host and in the application before diving into details. |
…ications Co-authored-by: davidfowl <[email protected]>
Enhanced the overview section to clarify that health checks operate in two main contexts: AppHost resource health checks for orchestration, and application health check endpoints for individual service monitoring. This provides better context before diving into specific details. (7c4f2a4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for AppHost resource health checks, addressing a gap in the existing health checks documentation that only covered application-level health check endpoints. The PR enhances the overview to distinguish between two contexts where health checks operate in .NET Aspire and adds detailed coverage of AppHost resource health checks for orchestration and dependency management.
Key changes:
- Enhanced overview section explaining the two contexts of health checks in .NET Aspire
- New comprehensive "AppHost resource health checks" section covering resource readiness, HTTP health checks, custom health checks, WaitFor integration, and dashboard integration
- Practical code examples demonstrating HTTP and custom health check implementations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I think it could use an infographic just to really drive home where different health checks are registered and how annotations point from resources to health checks in the AppHost DI container.
Thank you! An infographic would indeed help clarify the distinction between AppHost health checks and application health check endpoints, and how the resource annotations connect to the AppHost DI container. I'm unable to create visual diagrams in this environment, but this would follow the same pattern as other diagrams in the repository using Excalidraw. The infographic could visually represent:
This would complement the code examples and make the concepts much clearer for developers. |
The current fundamentals article on Health Checks only covered health check endpoints (
/health
and/alive
) and integration health checks, but was missing documentation for AppHost resource health checks - a key concept for resource orchestration and dependency management in .NET Aspire.This PR adds a comprehensive new section "AppHost resource health checks" and enhances the overview to clearly distinguish between the two main contexts where health checks operate in .NET Aspire:
The new AppHost resource health checks section covers:
WithHttpHealthCheck()
to poll endpoints on containers and project resourcesAddHealthChecks().AddCheck()
and associating them with resources usingWithHealthCheck()
WaitFor
API to control startup dependenciesThe documentation includes practical code examples matching the patterns described in the issue:
The enhanced overview section now provides better context by explaining upfront that health checks run in both the AppHost and applications before diving into specific details. All content follows Microsoft Writing Style Guide conventions and passes markdownlint validation.
Fixes #4309.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews