Difference between UseHealthChecks and MapHealthChecks #29421
Labels
doc-idea
seQUESTered
Identifies that an issue has been imported into Quest.
Source - Docs.ms
Docs Customer feedback via GitHub Issue
This Health checks in ASP.NET Core page doesn't mention
UseHealthChecks
at all, and the few places in this repository that contain it, don't explain the difference betweenUseHealthChecks
andMapHealthChecks
very well. The 2.2 to 3.0 migration page mentions benefits of authentication, but that wouldn't apply to the Kubernetes use that this page is using as an example.Because this page mentions Kubernetes readiness and liveness probe, and these endpoints are called a lot, I think this distinction would especially helpful. I've seen it mention that one might want to use one vs. the other when using logging middleware of requests.
I view one of the advantages of
UseHealthChecks
is that it will terminate the pipeline if the path matches so it can be placed before the logging middleware and the logs will be skipped.Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Associated WorkItem - 97769
The text was updated successfully, but these errors were encountered: