DataStudio.Postgres.Diagnostics 2.0.0-beta.1

This is a prerelease version of DataStudio.Postgres.Diagnostics.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DataStudio.Postgres.Diagnostics --version 2.0.0-beta.1
                    
NuGet\Install-Package DataStudio.Postgres.Diagnostics -Version 2.0.0-beta.1
                    
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="DataStudio.Postgres.Diagnostics" Version="2.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataStudio.Postgres.Diagnostics" Version="2.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="DataStudio.Postgres.Diagnostics" />
                    
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 DataStudio.Postgres.Diagnostics --version 2.0.0-beta.1
                    
#r "nuget: DataStudio.Postgres.Diagnostics, 2.0.0-beta.1"
                    
#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 DataStudio.Postgres.Diagnostics@2.0.0-beta.1
                    
#: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=DataStudio.Postgres.Diagnostics&version=2.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DataStudio.Postgres.Diagnostics&version=2.0.0-beta.1&prerelease
                    
Install as a Cake Tool

DataStudio.Postgres.Diagnostics

dotnet add package DataStudio.Postgres.Diagnostics --prerelease   # beta: remove at 2.0.0

The diagnostics engine of Data Studio, as a package of its own with no ASP.NET Core in it: the health sweep and its checks, the facts they read, IPostgresDiagnostics and its typed, stable-coded read model, and an opt-in health check built on Microsoft.Extensions.Diagnostics.HealthChecks. It answers "is this database healthy, and what should I look at?" for any host that registers an NpgsqlDataSource - a worker, a job host, a shared library - without a UI to mount.

Take DataStudio.Postgres.Diagnostics when you want the findings in your own code. Take DataStudio.Postgres when you want the Blazor UI over the same databases, or DataStudio.Marten when the application uses Marten; both bring this package with them, at exactly their own version, and you need not reference it.

It brings Npgsql (floor 9.0.4) and the Microsoft.Extensions.* abstractions it registers into (DependencyInjection.Abstractions, Logging.Abstractions, Options, Diagnostics.HealthChecks, floor 10.0.0), and references no ASP.NET Core, Marten, JasperFx or Weasel package. Target framework: net10.0.

using DataStudio.Postgres;

var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddNpgsqlDataSource(connectionString);      // found by itself, as the source "default"
builder.Services.AddPostgresDiagnostics();                   // options are validated on start

// ... in a hosted service:
await foreach (PostgresDatabaseRef db in diagnostics.ListDatabasesAsync(ct))
{
    PostgresDiagnosticsSnapshot snapshot = await diagnostics.GetSnapshotAsync(db, PostgresDiagnosticsRequest.FindingsOnly, ct);

    foreach (PostgresFinding finding in snapshot.Findings.Where(f => f.Severity <= PostgresSeverity.Warning))
    {
        Console.WriteLine($"{finding.Code} {finding.Severity}: {finding.Title}");
    }
}

AddPostgresDiagnostics() is refused in an application that also calls AddPostgres() or AddMarten() on the Data Studio builder: they register the engine themselves. There are no mutes without a UI, and a finding's studio path is a string relative to a mount that does not exist here (postgres/health?…; a host that has a studio mounted joins its own mount to it).

The long form - the request and the snapshot, findings and their codes, IncludeActivity, cost, the JSON shape and what it guarantees - is docs/diagnostics.md, and a complete worker is samples/DataStudio.Sample.Postgres.Worker. A release of any size may break the public API, the read model included; what is promised is in docs/stability.md: a finding's code never changes meaning.

Product Compatible and additional computed target framework versions.
.NET 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 (1)

Showing the top 1 NuGet packages that depend on DataStudio.Postgres.Diagnostics:

Package Downloads
DataStudio.Postgres

The Postgres pages of Data Studio: an embeddable Blazor Server admin UI for the PostgreSQL databases an ASP.NET Core application already registers as NpgsqlDataSource.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-preview.5 0 12/3/2026
3.0.0-preview.4 46 12/2/2026
3.0.0-preview.3 55 12/2/2026
3.0.0-preview.2 84 11/30/2026
3.0.0-preview.1 97 11/28/2026
2.0.2 133 11/28/2026
2.0.1 128 11/21/2026
2.0.0 141 11/19/2026
2.0.0-beta.3 71 11/19/2026
2.0.0-beta.2 67 11/19/2026
2.0.0-beta.1 76 11/17/2026