Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adrianiftode/0665d1239819aa3e439aef13aeeff30c to your computer and use it in GitHub Desktop.
Save adrianiftode/0665d1239819aa3e439aef13aeeff30c to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecks()
// Specify a typed policy to enable executing a health check
// This policy could have an exhaustive implementation and
// reused with other dependencies.
.AddCheck("MyDependency", () => HealthCheckResult.Healthy())
.CheckOnlyWhen<FeatureFlagsPolicy>("MyDependency",
conditionalHealthCheckPolicyCtorArgs: "NewFeature");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment