Skip to content

Commit f9eb4b7

Browse files
authored
Updated the health endpoints (dotnet#467)
1 parent 3bc2b3a commit f9eb4b7

File tree

3 files changed

+6
-6
lines changed
  • samples/eShopLite/ServiceDefaults
  • src/Aspire.ProjectTemplates/templates
    • aspire-empty/AspireApplication-1.ServiceDefaults
    • aspire-starter/AspireStarterApplication-1.ServiceDefaults

3 files changed

+6
-6
lines changed

samples/eShopLite/ServiceDefaults/Extensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
100100
// app.MapPrometheusScrapingEndpoint();
101101

102102
// All health checks must pass for app to be considered ready to accept traffic after starting
103-
app.MapHealthChecks("/readiness");
103+
app.MapHealthChecks("/health");
104104

105105
// Only health checks tagged with the "live" tag must pass for app to be considered alive
106-
app.MapHealthChecks("/liveness", new HealthCheckOptions
106+
app.MapHealthChecks("/alive", new HealthCheckOptions
107107
{
108108
Predicate = r => r.Tags.Contains("live")
109109
});

src/Aspire.ProjectTemplates/templates/aspire-empty/AspireApplication-1.ServiceDefaults/Extensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
100100
// app.MapPrometheusScrapingEndpoint();
101101

102102
// All health checks must pass for app to be considered ready to accept traffic after starting
103-
app.MapHealthChecks("/readiness");
103+
app.MapHealthChecks("/health");
104104

105105
// Only health checks tagged with the "live" tag must pass for app to be considered alive
106-
app.MapHealthChecks("/liveness", new HealthCheckOptions
106+
app.MapHealthChecks("/alive", new HealthCheckOptions
107107
{
108108
Predicate = r => r.Tags.Contains("live")
109109
});

src/Aspire.ProjectTemplates/templates/aspire-starter/AspireStarterApplication-1.ServiceDefaults/Extensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
100100
// app.MapPrometheusScrapingEndpoint();
101101

102102
// All health checks must pass for app to be considered ready to accept traffic after starting
103-
app.MapHealthChecks("/readiness");
103+
app.MapHealthChecks("/health");
104104

105105
// Only health checks tagged with the "live" tag must pass for app to be considered alive
106-
app.MapHealthChecks("/liveness", new HealthCheckOptions
106+
app.MapHealthChecks("/alive", new HealthCheckOptions
107107
{
108108
Predicate = r => r.Tags.Contains("live")
109109
});

0 commit comments

Comments
 (0)