MCPcopy Create free account
hub / github.com/aptabase/aptabase / MapDefaultEndpoints

Method MapDefaultEndpoints

src/Extensions/TelemetryExtensions.cs:90–107  ·  view source on GitHub ↗
(this WebApplication app)

Source from the content-addressed store, hash-verified

88 }
89
90 public static WebApplication MapDefaultEndpoints(this WebApplication app)
91 {
92 // Adding health checks endpoints to applications in non-development environments has security implications.
93 // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
94 if (app.Environment.IsDevelopment())
95 {
96 // All health checks must pass for app to be considered ready to accept traffic after starting
97 app.MapHealthChecks("/health");
98
99 // Only health checks tagged with the "live" tag must pass for app to be considered alive
100 app.MapHealthChecks("/alive", new HealthCheckOptions
101 {
102 Predicate = r => r.Tags.Contains("live")
103 });
104 }
105
106 return app;
107 }
108}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected