ReactiveProbes 1.3.0
dotnet add package ReactiveProbes --version 1.3.0
NuGet\Install-Package ReactiveProbes -Version 1.3.0
<PackageReference Include="ReactiveProbes" Version="1.3.0" />
<PackageVersion Include="ReactiveProbes" Version="1.3.0" />
<PackageReference Include="ReactiveProbes" />
paket add ReactiveProbes --version 1.3.0
#r "nuget: ReactiveProbes, 1.3.0"
#:package ReactiveProbes@1.3.0
#addin nuget:?package=ReactiveProbes&version=1.3.0
#tool nuget:?package=ReactiveProbes&version=1.3.0
ReactiveProbes
An ASP.NET startup probe built with reactive extensions. It validates all registered health checks and marks the startup as ready. It exposes a /ready endpoint that returns healthy or unhealthy for startup probes to mark the API as ready or not.
Features
- Validates all registered health checks.
- Marks the startup as ready based on health checks.
- Exposes a
/readyendpoint for readiness probes. - Adds REST API health checks.
- Adds SQL Server health checks using connection strings or EF Core DbContext.
- Registers reactive health probes with
/startand/stopendpoints.
Installation
To include ReactiveProbes in your project, you can use the following NuGet package:
dotnet add package ReactiveProbes
Usage
Register the health checks in your ASP.NET web API.
Add ReactiveProbes to your startup:
services.AddReactiveProbes();
Register the probes:
app.RegisterReactiveStartupProbe();
The /ready endpoint will be available to check the readiness of your application.
Adding REST API Health Checks
To add a REST API health check:
services.AddHealthChecks()
.AddRestApiCheck("api-check", "https://api.example.com/health");
Adding SQL Server Health Checks
To add a SQL Server health check using a connection string from the configuration:
services.AddHealthChecks()
.AddSqlServerCheck("DefaultConnection");
To add a SQL Server health check using an EF Core DbContext:
services.AddHealthChecks()
.AddSqlServerCheck<MyDbContext>();
Registering Reactive Health Probes
To register reactive health probes with start and stop endpoints:
app.RegisterReactiveHealthProbe();
This sets up the following endpoints:
/healthto display the health check status/health/stopto stop the health checks/health/startto start the health checks
Contributing
Feel free to submit issues, fork the repository and send pull requests!
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Data.SqlClient (>= 6.1.3)
- Microsoft.EntityFrameworkCore (>= 10.0.1)
- System.Reactive (>= 6.1.0)
-
net8.0
- Microsoft.Data.SqlClient (>= 6.1.3)
- Microsoft.EntityFrameworkCore (>= 9.0.0)
- Microsoft.Extensions.Configuration (>= 10.0.1)
- Microsoft.Extensions.DependencyInjection (>= 10.0.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.1)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.1)
- System.Diagnostics.DiagnosticSource (>= 10.0.1)
- System.Reactive (>= 6.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.