public static HealthCheckBuilder AddCounterCheck(this HealthCheckBuilder builder, CounterCheckOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var settings = new CounterCheckSettings(options.Name, options.Critical, options.Frequency, options.Tags, options.ErrorThreshold, options.WarningThreshold, options.Distributed);

            return(builder.AddCounterCheck(settings));
        }
 private static HealthCheckBuilder AddCounterCheck(this HealthCheckBuilder builder, CounterCheckSettings settings)
 {
     builder.Services.AddLocalCounters();
     return(builder.Add <CounterCheck>(settings));
 }