Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rysweet committed Oct 8, 2024
1 parent a4a9f47 commit cffc992
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions dotnet/src/Microsoft.AutoGen.ServiceDefaultsFoo/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBu
// {
// options.AllowedSchemes = ["https"];
// });

return builder;
}

public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder)
{
builder.Logging.AddOpenTelemetry(logging =>
Expand Down Expand Up @@ -69,7 +67,6 @@ public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicati

return builder;
}

private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder)
{
var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]);
Expand All @@ -85,19 +82,15 @@ private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostAppli
// builder.Services.AddOpenTelemetry()
// .UseAzureMonitor();
//}

return builder;
}

public static IHostApplicationBuilder AddDefaultHealthChecks(this IHostApplicationBuilder builder)
{
builder.Services.AddHealthChecks()
// Add a default liveness check to ensure app is responsive
.AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]);

return builder;
}

public static WebApplication MapDefaultEndpoints(this WebApplication app)
{
// Adding health checks endpoints to applications in non-development environments has security implications.
Expand All @@ -113,7 +106,6 @@ public static WebApplication MapDefaultEndpoints(this WebApplication app)
Predicate = r => r.Tags.Contains("live")
});
}

return app;
}
}

0 comments on commit cffc992

Please sign in to comment.