-
Notifications
You must be signed in to change notification settings - Fork 466
[HealthChecks] Register health check services & checks #11183
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
base: dev
Are you sure you want to change the base?
Conversation
src/WebJobs.Script/Diagnostics/HealthChecks/HealthCheckExtensions.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Script/Diagnostics/HealthChecks/HealthCheckExtensions.cs
Outdated
Show resolved
Hide resolved
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 registers health check services and implements two health checks for monitoring the web host and script host lifecycles in Azure Functions. It replaces FluentAssertions with AwesomeAssertions across test files and adds comprehensive health check infrastructure.
- Adds health check registration to the web host service collection
- Implements WebHostHealthCheck and ScriptHostHealthCheck with lifecycle monitoring
- Creates standardized health check names and tags for Azure Functions
- Replaces FluentAssertions with AwesomeAssertions in test files
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
WebJobs.Script.Tests.csproj | Replaces FluentAssertions package with AwesomeAssertions |
AppServiceHeaderFixupMiddlewareTests.cs | Updates using statement for new assertion library |
OpenTelemetryConfigurationExtensionsTests.cs | Updates using statement for new assertion library |
WebHostHealthCheckTests.cs | Updates using statement for new assertion library |
ScriptHostHealthCheckTests.cs | Updates using statement for new assertion library |
HealthCheckExtensionsTests.cs | New test file for health check extension methods |
WebHostHealthCheck.cs | Adds XML documentation for the web host health check |
ScriptHostHealthCheck.cs | Adds XML documentation for the script host health check |
HealthCheckTags.cs | New file defining standardized health check tags |
HealthCheckNames.cs | New file defining standardized health check names |
HealthCheckExtensions.cs | New file with extension methods for registering health checks |
WebHostServiceCollectionExtensions.cs | Registers health check services in the web host |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.Callback((HealthCheckRegistration registration) => | ||
{ | ||
Type r = registration.Factory.GetMethodInfo().ReturnType; | ||
}); |
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.
The callback in this test setup captures a registration parameter but only assigns to a local variable that isn't used. This appears to be leftover debugging code that should be removed for clarity.
}); | |
builder.Setup(b => b.Add(It.IsAny<HealthCheckRegistration>())).Returns(builder.Object); |
Copilot uses AI. Check for mistakes.
Issue describing the changes in this PR
Part of #11010, #11168
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md
Additional information
Registers health check services and 2 health checks for the web and script host lifecycle. Release notes are not yet updated as these services are still not yet consumed, and thus no runtime impact (yet)