Altinn.AspNet.HealthChecks.Probes 0.3.0

dotnet add package Altinn.AspNet.HealthChecks.Probes --version 0.3.0
                    
NuGet\Install-Package Altinn.AspNet.HealthChecks.Probes -Version 0.3.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Altinn.AspNet.HealthChecks.Probes" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Altinn.AspNet.HealthChecks.Probes" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Altinn.AspNet.HealthChecks.Probes" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Altinn.AspNet.HealthChecks.Probes --version 0.3.0
                    
#r "nuget: Altinn.AspNet.HealthChecks.Probes, 0.3.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Altinn.AspNet.HealthChecks.Probes@0.3.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Altinn.AspNet.HealthChecks.Probes&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Altinn.AspNet.HealthChecks.Probes&version=0.3.0
                    
Install as a Cake Tool

Altinn.AspNet.HealthChecks.Probes

Experimental — pre-1.0.0. APIs and conventions may change without notice before the 1.0.0 release.

Config-driven outbound HTTP probes for Altinn.AspNet.HealthChecks. Probe a list of upstream services — as absolute URLs, or as paths resolved against a per-environment base URI — and have them surface on /health/deep as hard or soft dependencies.

dotnet add package Altinn.AspNet.HealthChecks.Probes

Usage

using Altinn.AspNet.HealthChecks.Probes;

builder.Services.AddAltinnHealthChecks()
    .AddOutboundProbes(builder.Configuration.GetSection("HealthProbes"), probes =>
    {
        probes.BaseUri = new Uri("https://platform.tt02.altinn.no/");
        probes.Timeout = TimeSpan.FromSeconds(10);
    })
    // Upstreams that are not configuration-driven:
    .AddOutboundProbe("Maskinporten", new Uri("https://test.maskinporten.no/.well-known/oauth-authorization-server"));
{
  "HealthProbes": [
    { "Name": "Access Management", "RelativePath": "accessmanagement/api/v1/meta/info", "Hard": true },
    { "Name": "PDP", "Url": "https://pdp.example.no/health" }
  ]
}

RelativePath resolves against BaseUri, so the same configuration works in every environment with only the base URI changing. Url is absolute. Exactly one of the two must be set — the package validates this at registration and names the offending configuration path.

RelativePath must be genuinely relative: absolute URIs and leading slashes are rejected rather than resolved. Both would otherwise pass silently while ignoring BaseUri — an absolute value lets a test deployment probe production, and a leading slash discards any path on the base URI — and both look correct in a config review.

You pass the IConfigurationSection yourself; the package never invents a key name. An Altinn app's configuration may arrive from Azure App Configuration, so a section that appears in no appsettings.json is not evidence that the key is unset.

Hard is not the same as critical

Tag Failing means Effect
Hard = true external Unhealthy /health/deep fails
Hard = false external Degraded /health/deep stays 200
critical tag critical Unhealthy readiness fails — the instance is de-pooled

These are different axes and conflating them is the mistake this package exists to prevent. Hard describes how loudly a deep probe complains; critical describes whether your instance should be taken out of rotation. Outbound probes are tagged external and should essentially never be critical — otherwise an upstream outage pulls your own healthy pods out of the load balancer, turning someone else's incident into yours.

Behaviour

  • Every probe is tagged external, so it runs only on /health/deep. Add more via options.Tags.
  • Duplicate names throw at registration, naming the configuration path that introduced the collision — including collisions with checks from other packages (self, warmup) or your own AddCheck calls. Health check names must be unique; a duplicate that reaches MapAltinnHealthChecks is a hard startup crash naming only the check, which is much harder to trace back. Checks registered after this call are still only caught at mapping.
  • Timeout (default 10s) applies per probe. Options are per call, not per chain: a second AddOutboundProbe(...) chained after AddOutboundProbes(...) needs its own configure callback, or it silently falls back to the defaults.
  • An empty or missing section registers nothing and does not throw — an environment may legitimately configure no probes.

BaseUri resolution uses new Uri(baseUri, relativePath), so a base URI without a trailing slash drops its last segment: https://example.no/api + meta/info gives https://example.no/meta/info. Include the trailing slash when the base has a path.

Product 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 92 8/23/2026
0.2.0 81 8/18/2026