diff --git a/docs/core/diagnostics/diagnostic-health-checks.md b/docs/core/diagnostics/diagnostic-health-checks.md index fbd9c89d632fc..1eed4f2e0d072 100644 --- a/docs/core/diagnostics/diagnostic-health-checks.md +++ b/docs/core/diagnostics/diagnostic-health-checks.md @@ -25,16 +25,12 @@ To perform health checks on the resource utilization of your .NET apps, add a pa The preceding code: - Creates a new instance. -- Adds resource monitoring by calling . - Adds a health check for resource utilization by chaining a call from the call to the extension method. - Builds the instance as the `app` variable. - Gets an instance of the class from the service provider. - Performs a health check and displays the result. - Runs the application. -> [!NOTE] -> The `Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization` library assumes that the consumer will register the dependent call to . If you don't register this, when resolving the `HealthCheckService` an exception is thrown. - ## Application lifetime health checks To perform health checks on the application lifetime events of , use the extension method available in the [Microsoft.Extensions.Diagnostics.HealthChecks.Common](https://www.nuget.org/packages/Microsoft.Extensions.Diagnostics.HealthChecks.Common) NuGet package. diff --git a/docs/core/diagnostics/snippets/health-checks/Program.cs b/docs/core/diagnostics/snippets/health-checks/Program.cs index 47efc981236ac..83c82c6544291 100644 --- a/docs/core/diagnostics/snippets/health-checks/Program.cs +++ b/docs/core/diagnostics/snippets/health-checks/Program.cs @@ -1,12 +1,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; -using Microsoft.Extensions.Diagnostics.ResourceMonitoring; using Microsoft.Extensions.Hosting; var builder = Host.CreateApplicationBuilder(args); -builder.Services.AddResourceMonitoring(); - builder.Services.AddHealthChecks() .AddResourceUtilizationHealthCheck();