CoreSystem.Observability.Abstractions 1.1.0

dotnet add package CoreSystem.Observability.Abstractions --version 1.1.0
                    
NuGet\Install-Package CoreSystem.Observability.Abstractions -Version 1.1.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="CoreSystem.Observability.Abstractions" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreSystem.Observability.Abstractions" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="CoreSystem.Observability.Abstractions" />
                    
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 CoreSystem.Observability.Abstractions --version 1.1.0
                    
#r "nuget: CoreSystem.Observability.Abstractions, 1.1.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 CoreSystem.Observability.Abstractions@1.1.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=CoreSystem.Observability.Abstractions&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CoreSystem.Observability.Abstractions&version=1.1.0
                    
Install as a Cake Tool

🧩 CoreSystem.Observability.Abstractions

Base contracts for health checks and observability contributors in .NET 8, 9 and 10

CoreSystem.Observability.Abstractions defines the extension points that let CoreSystem modules contribute health checks and OpenTelemetry activity sources without depending on the observability runtime. It references only Microsoft.Extensions.Diagnostics.HealthChecks; CoreSystem.Observability discovers the registered contributors and wires them into the host.

NuGet Downloads License .NET


✨ Features

  • ✅ IHealthCheckContributor contract for module health checks
  • ✅ IObservabilityContributor contract for activity sources and DI registration
  • ✅ Decoupled from the OpenTelemetry runtime
  • ✅ Contributors are discovered by CoreSystem.Observability from dependency injection
  • ✅ Targets .NET 8, .NET 9 and .NET 10

📦 Installation

dotnet add package CoreSystem.Observability.Abstractions

🚀 Quick Start

Implement a health check contributor:

using Core.Observability.Abstractions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;

public sealed class DatabaseHealthCheckContributor : IHealthCheckContributor
{
    public void RegisterHealthChecks(
        IHealthChecksBuilder builder,
        IConfiguration configuration)
    {
        builder.AddCheck("database", () => HealthCheckResult.Healthy());
    }
}

Implement an observability contributor:

using Core.Observability.Abstractions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

public sealed class OrdersObservabilityContributor : IObservabilityContributor
{
    public IEnumerable<string> GetActivitySources()
        => ["Orders.Api"];

    public void ConfigureObservability(
        IServiceCollection services,
        IConfiguration configuration)
    {
        // Register observability services used by the module.
    }
}

Register the contributors as instances so CoreSystem.Observability can discover them:

builder.Services.AddSingleton<IHealthCheckContributor>(
    new DatabaseHealthCheckContributor());
builder.Services.AddSingleton<IObservabilityContributor>(
    new OrdersObservabilityContributor());

🧩 Contributor Contracts

Interface Member Purpose
IHealthCheckContributor RegisterHealthChecks(IHealthChecksBuilder, IConfiguration) Adds health checks to the health checks builder.
IObservabilityContributor GetActivitySources() Returns the activity source names contributed by the module.
IObservabilityContributor ConfigureObservability(IServiceCollection, IConfiguration) Registers observability services in the DI container.

🏗 How Discovery Works

Contributors are not discovered by scanning assemblies. Each module registers its contributors as instances in the dependency injection container, and CoreSystem.Observability reads them when the host is built:

Module
  │  services.AddSingleton<IHealthCheckContributor>(new MyContributor())
  ▼
CoreSystem.Observability
  │  reads the IServiceCollection descriptors
  ▼
Health checks and activity sources registered

Note: discovery looks for registered instances. A type registration such as AddSingleton<IHealthCheckContributor, MyContributor>() is not picked up.


📖 Documentation

The full documentation includes:

  • Architecture overview
  • Dependency injection guide
  • Package dependency map

Visit the GitHub repository for the complete documentation.


🤝 Contributing

Issues and pull requests are welcome.


📄 License

Released under the MIT License.

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 (6)

Showing the top 5 NuGet packages that depend on CoreSystem.Observability.Abstractions:

Package Downloads
CoreSystem.Resilience

Production-ready resilience framework for .NET 8, .NET 9 and .NET 10 with configurable resilience pipelines, Retry, Timeout, Circuit Breaker, and OpenTelemetry metrics.

CoreSystem.Idempotency

Production-ready idempotency framework for ASP.NET Core featuring duplicate suppression, request fingerprinting, response replay, OpenTelemetry integration, and a provider-based storage architecture.

CoreSystem.RateLimiting

Safe fixed-window rate limiting for ASP.NET Core APIs.

CoreSystem.Observability

Standardized observability for .NET 8, .NET 9 and .NET 10 Cloud-Native apps with OpenTelemetry and Serilog.

CoreSystem.Idempotency.PostgreSql

Production-ready PostgreSQL storage provider for CoreSystem.Idempotency, providing durable persistence through the IIdempotencyStorage abstraction with Dapper-based data access. Ships an idempotent schema script at scripts/postgres.sql.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 156 10/21/2026
1.0.2 335 10/18/2026
1.0.1 419 10/7/2026
1.0.0 1,410 7/3/2026

1.0.2: Dependency refresh. Microsoft.Extensions.Diagnostics.HealthChecks 8.0.28 to 8.0.32. No code or API changes.
1.1.0: targets net8.0, net9.0 and net10.0. No public API or behavior change; the net9.0 and net10.0 assets are new, and the net8.0 asset is unchanged. Microsoft.Extensions.Configuration(.Abstractions), Diagnostics.HealthChecks and Options are declared per TFM (8.0.x / 9.0.21 / 10.0.13).