How to add service-specific health checks? #1292
-
Currently health checks are registered in the I now want to add service-specific health checks. Some examples:
What's the suggested way to do this? Option 1
builder.AddDefaultHealthChecks()
.AddUrlGroup(new Uri("http://api/_health"), "api"); Option 2
builder.Services.AddHealthChecks()
.AddUrlGroup(new Uri("http://api/_health"), "api"); Considering |
Beta Was this translation helpful? Give feedback.
Answered by
DamianEdwards
Dec 8, 2023
Replies: 1 comment 2 replies
-
Option 2 is the right approach. The eShopLite sample in the aspire-samples repo has some extra custom extension methods that demonstrate this. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Kralizek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Option 2 is the right approach. The eShopLite sample in the aspire-samples repo has some extra custom extension methods that demonstrate this.