Kck.Observability.Abstractions 3.4.0

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

Kck.Observability.Abstractions

Observability abstractions — distributed tracing (ITracingService), structured metrics (IMetricsService), and health checks (IHealthCheck) backed by the OpenTelemetry provider.

Installation

dotnet add package Kck.Observability.Abstractions

Quick Start

// Program.cs — register a concrete provider (Kck.Observability.OpenTelemetry)
builder.Services.AddKckOpenTelemetry(builder.Configuration);

// Tracing — wrap operations in spans
public class OrderService(ITracingService tracer, IMetricsService metrics)
{
    private readonly ICounter _ordersCreated =
        metrics.CreateCounter("orders.created", "Number of orders placed");

    public async Task<Order> CreateOrderAsync(CreateOrderCommand cmd, CancellationToken ct)
    {
        using var span = tracer.StartSpan("order.create");
        span.SetTag("customer.id", cmd.CustomerId.ToString());
        try
        {
            var order = await _repo.AddAsync(Order.Create(cmd), ct);
            _ordersCreated.Increment();
            span.SetStatus(SpanStatus.Ok);
            return order;
        }
        catch (Exception ex)
        {
            span.RecordException(ex);
            span.SetStatus(SpanStatus.Error);
            throw;
        }
    }
}

Configuration

Property Description Default
Observability:ServiceName Service name in traces/metrics Assembly name
Observability:Otlp:Endpoint OTLP exporter endpoint "http://localhost:4317"
Observability:Tracing:SamplingRatio Head sampling ratio (0.0–1.0) 1.0

Resources

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.
  • net10.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Kck.Observability.Abstractions:

Package Downloads
Kck.Bundle.WebApi

Opinionated ASP.NET Core WebAPI starter pack. Registers Serilog, in-memory caching, JWT auth, Argon2 hashing, InMemory event bus, OpenTelemetry, rate limiting, security headers, CORS, and global exception handling in a single AddKckWebApiDefaults() call.

Kck.Bundle.WorkerService

Opinionated .NET Worker Service starter pack. Registers Serilog, OpenTelemetry, InMemory event bus, and a mutually-exclusive background job scheduler (Hangfire or Quartz) in a single call.

Kck.Bundle.MinimalApi

Lightweight ASP.NET Core Minimal API starter pack. Slim variant of the WebAPI bundle — provides Serilog, in-memory caching, JWT, exception handling, and health checks without MediatR pipeline or Argon2 overhead.

Kck.Observability.OpenTelemetry

OpenTelemetry-backed ITracingService and IMetricsService implementations. Exports traces and metrics via OTLP protocol, wires ASP.NET Core and EF Core auto-instrumentation, and registers Kck health checks at /health. Registered via AddKckObservability().

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.0 129 5/17/2026
3.3.0 124 5/17/2026
3.2.0 122 5/17/2026
3.1.0 124 5/17/2026
3.0.0 126 5/17/2026
2.0.0 127 5/7/2026