142 references to AddHealthChecks
Aspire.Azure.AI.OpenAI (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Data.Tables (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Messaging.EventHubs (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Messaging.ServiceBus (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Messaging.WebPubSub (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Search.Documents (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Security.KeyVault (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Storage.Blobs (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Azure.Storage.Queues (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Confluent.Kafka (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Elastic.Clients.Elasticsearch (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Hosting (2)
DistributedApplicationBuilder.cs (1)
209_innerBuilder.Services.AddHealthChecks();
ResourceBuilderExtensions.cs (1)
891builder.ApplicationBuilder.Services.AddHealthChecks().AddUrlGroup((UriHealthCheckOptions options) =>
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
140builder.ApplicationBuilder.Services.AddHealthChecks().AddAzureCosmosDB(sp =>
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
183builder.ApplicationBuilder.Services.AddHealthChecks().AddAzureEventHub(
Aspire.Hosting.Azure.Storage (1)
AzureStorageExtensions.cs (1)
122builder.ApplicationBuilder.Services.AddHealthChecks().AddAzureBlobStorage(sp =>
Aspire.Hosting.Azure.Tests (3)
AzureCosmosDBEmulatorFunctionalTests.cs (1)
30builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
AzureEventHubsExtensionsTests.cs (1)
30builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
AzureStorageEmulatorFunctionalTests.cs (1)
26builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Elasticsearch (1)
ElasticsearchBuilderExtensions.cs (1)
74builder.Services.AddHealthChecks()
Aspire.Hosting.Elasticsearch.Tests (1)
ElasticsearchFunctionalTests.cs (1)
214builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
76builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Garnet.Tests (1)
GarnetFunctionalTests.cs (1)
27builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
71builder.Services.AddHealthChecks().Add(healthCheckRegistration);
Aspire.Hosting.Kafka.Tests (1)
KafkaFunctionalTests.cs (1)
28builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.MongoDB (2)
MongoDBBuilderExtensions.cs (2)
74builder.Services.AddHealthChecks().AddMongoDb(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey); 120builder.ApplicationBuilder.Services.AddHealthChecks().AddMongoDb(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.MongoDB.Tests (1)
MongoDbFunctionalTests.cs (1)
39builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
51builder.Services.AddHealthChecks().AddMySql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.MySql.Tests (1)
MySqlFunctionalTests.cs (1)
35builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Nats (1)
NatsBuilderExtensions.cs (1)
82builder.Services.AddHealthChecks()
Aspire.Hosting.Nats.Tests (1)
NatsFunctionalTests.cs (1)
330builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
47builder.Services.AddHealthChecks()
Aspire.Hosting.Oracle.Tests (1)
OracleFunctionalTests.cs (1)
358builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
66builder.Services.AddHealthChecks().AddNpgSql(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey, configure: (connection) =>
Aspire.Hosting.PostgreSQL.Tests (1)
PostgresFunctionalTests.cs (1)
38builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
62builder.Services.AddHealthChecks()
Aspire.Hosting.Qdrant.Tests (1)
QdrantFunctionalTests.cs (1)
230builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
55builder.Services.AddHealthChecks().AddRabbitMQ((sp, options) =>
Aspire.Hosting.RabbitMQ.Tests (1)
RabbitMQFunctionalTests.cs (1)
29builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
58builder.Services.AddHealthChecks().AddRedis(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.Redis.Tests (1)
RedisFunctionalTests.cs (1)
33builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
49builder.Services.AddHealthChecks().AddSqlServer(sp => connectionString ?? throw new InvalidOperationException("Connection string is unavailable"), name: healthCheckKey);
Aspire.Hosting.SqlServer.Tests (1)
SqlServerFunctionalTests.cs (1)
29builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Tests (8)
Health\ResourceHealthCheckServiceTests.cs (7)
53builder.Services.AddHealthChecks().AddCheck("healthcheck_a", () => HealthCheckResult.Healthy()); 91builder.Services.AddHealthChecks().AddCheck("resource_check", () => 139builder.Services.AddHealthChecks().AddAsyncCheck("resource_check", async () => 210builder.Services.AddHealthChecks().AddCheck("resource_check", (check) => 250builder.Services.AddHealthChecks().AddCheck("parent_test", () => 309builder.Services.AddHealthChecks().AddCheck("parent_test", () => 361builder.Services.AddHealthChecks().AddCheck("parent_test", () => HealthCheckResult.Healthy());
HealthCheckTests.cs (1)
69builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
74builder.Services.AddHealthChecks()
Aspire.Hosting.Valkey.Tests (1)
ValkeyFunctionalTests.cs (1)
204builder.Services.AddHealthChecks().AddAsyncCheck("blocking_check", () =>
Aspire.Microsoft.Data.SqlClient (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Milvus.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.MongoDB.Driver (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.MySqlConnector (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.NATS.Net (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Npgsql (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Oracle.EntityFrameworkCore (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Qdrant.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.RabbitMQ.Client (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.Seq (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
Aspire.StackExchange.Redis (1)
src\Components\Common\HealthChecksExtensions.cs (1)
29addHealthCheck(builder.Services.AddHealthChecks());
CatalogDb (1)
Program.cs (1)
13builder.Services.AddHealthChecks()
HealthChecksSample (6)
BasicStartup.cs (1)
12services.AddHealthChecks();
CustomWriterStartup.cs (1)
17services.AddHealthChecks()
DbContextHealthStartup.cs (1)
21services.AddHealthChecks()
DBHealthStartup.cs (1)
19services.AddHealthChecks()
LivenessProbeStartup.cs (1)
15.AddHealthChecks()
ManagementPortStartup.cs (1)
19services.AddHealthChecks();
HealthChecksSandbox.AppHost (1)
Program.cs (1)
31builder.Services.AddHealthChecks()
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (27)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (2)
67services.AddHealthChecks(); 112services.AddHealthChecks();
HealthCheckMiddlewareTests.cs (25)
56services.AddHealthChecks(); 83services.AddHealthChecks(); 110services.AddHealthChecks(); 140services.AddHealthChecks(); 170services.AddHealthChecks() 203services.AddHealthChecks() 236services.AddHealthChecks() 269services.AddHealthChecks() 315services.AddHealthChecks() 352services.AddHealthChecks() 390services.AddHealthChecks(); 419services.AddHealthChecks(); 454services.AddHealthChecks(); 489services.AddHealthChecks() 523services.AddHealthChecks(); 553services.AddHealthChecks(); 581services.AddHealthChecks(); 611services.AddHealthChecks(); 646services.AddHealthChecks(); 683services.AddHealthChecks(); 721services.AddHealthChecks(); 759services.AddHealthChecks(); 797services.AddHealthChecks(); 839services.AddHealthChecks(); 883services.AddHealthChecks();
Microsoft.Extensions.Diagnostics.HealthChecks (2)
HealthCheckService.cs (2)
20/// <see cref="HealthCheckServiceCollectionExtensions.AddHealthChecks(IServiceCollection)"/>. 24/// <see cref="HealthCheckServiceCollectionExtensions.AddHealthChecks(IServiceCollection)"/>
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
CommonHealthChecksExtensions.Manual.cs (1)
59.AddHealthChecks();
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (8)
ApplicationLifecycleHealthChecksExtensionsTests.cs (3)
21serviceCollection.AddHealthChecks().AddApplicationLifecycleHealthCheck(); 31serviceCollection.AddHealthChecks().AddApplicationLifecycleHealthCheck("test1", "test2"); 41serviceCollection.AddHealthChecks().AddApplicationLifecycleHealthCheck(new List<string> { "test1", "test2" });
ManualHealthCheckExtensionsTests.cs (5)
18serviceCollection.AddHealthChecks().AddManualHealthCheck(); 27serviceCollection.AddHealthChecks().AddManualHealthCheck("test1", "test2"); 36serviceCollection.AddHealthChecks().AddManualHealthCheck(new List<string> { "test1", "test2" }); 44Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).AddHealthChecks().AddManualHealthCheck()); 45Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).AddHealthChecks().AddManualHealthCheck(null!));
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (16)
DefaultHealthCheckServiceTest.cs (2)
33serviceCollection.AddHealthChecks() 632var builder = services.AddHealthChecks();
DependencyInjection\HealthChecksBuilderTest.cs (10)
27services.AddHealthChecks().AddCheck("test", failureStatus: HealthStatus.Degraded, tags: new[] { "tag", }, instance: instance); 47services.AddHealthChecks().AddCheck<TestHealthCheck>("test", failureStatus: HealthStatus.Degraded, tags: new[] { "tag", }); 70services.AddHealthChecks().AddCheck<TestHealthCheck>("test", failureStatus: HealthStatus.Degraded, tags: new[] { "tag", }); 91.AddHealthChecks() 115services.AddHealthChecks().AddCheck("test", tags: new[] { "tag", }, check: () => 138services.AddHealthChecks().AddCheck("test", (_) => 161services.AddHealthChecks().AddAsyncCheck("test", () => 184services.AddHealthChecks().AddAsyncCheck("test", (_) => 207.AddHealthChecks() 210.AddHealthChecks()
DependencyInjection\ServiceCollectionExtensionsTest.cs (3)
22services.AddHealthChecks(); 23services.AddHealthChecks(); 53services.AddHealthChecks();
HealthCheckPublisherHostedServiceTest.cs (1)
746IHealthChecksBuilder builder = serviceCollection.AddHealthChecks();
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesExtensions.cs (1)
44_ = services.AddHealthChecks();
Microsoft.Extensions.Diagnostics.Probes.Tests (5)
KubernetesProbesExtensionsTests.cs (3)
33services.AddKubernetesProbes().AddHealthChecks(); 77}).AddHealthChecks(); 105services.AddKubernetesProbes(configuration.GetSection("KubernetesProbes")).AddHealthChecks();
KubernetesProbesOptionsValidatorTests.cs (2)
78}).AddHealthChecks(); 109}).AddHealthChecks();
OrleansServiceDefaults (1)
Extensions.cs (1)
89builder.Services.AddHealthChecks()
Playground.ServiceDefaults (1)
Extensions.cs (1)
86builder.Services.AddHealthChecks()
Seq.ServiceDefaults (1)
Extensions.cs (1)
88builder.Services.AddHealthChecks()
TestingAppHost1.ServiceDefaults (1)
Extensions.cs (1)
95builder.Services.AddHealthChecks()
TestProject.IntegrationServiceA (1)
Program.cs (1)
27builder.Services.AddHealthChecks();
TestShop.ServiceDefaults (1)
Extensions.cs (1)
85builder.Services.AddHealthChecks()