ActDim.Observability 1.0.4

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

ActDim.Observability

A lightweight, OpenTelemetry-centric observability library for .NET applications built on top of Microsoft.Extensions.Logging and System.Diagnostics.Activity.

Features

  • Zero-Ceremony Developer API: Developers write standard ILogger calls and logger.BeginScope() without needing custom logger interfaces.
  • DI Decorator (EventObservabilityLoggerFactory): Transparently decorates ILoggerFactory via DI container to inject EventObservabilityBridge for enriching logs and traces.
  • Activity & OpenTelemetry Enrichment: Automatically transforms scope objects, DTOs, and structured log parameters into flattened, dotted OpenTelemetry attributes (user.id, order.price).
  • Auto Activity Creation on Scope: Automatically starts an Activity span on logger.BeginScope() when no ambient span exists (Activity.Current == null), resolved via observability.PushActivitySourceName(...) or EventObservabilityOptions.DefaultActivitySourceName.
  • Ambient Context Separation: IAmbientContext serves as a neutral ambient variable store. Only properties explicitly pushed via IObservabilityContext are exported to Activity tags.
  • Status & Progress Tracking: First-class support for setting operation status text, icons, and progress percentage (observability.SetStatus("Downloading", icon: "🚀"), observability.SetProgress(45.5)).
  • Selective Provider & Scope Suppression: Dynamically suppress console loggers, specific logger providers, or external scope export per async flow (observability.SuppressConsole(), observability.SuppressProviders("File"), observability.SuppressExternalScopes()).
  • Provider Alias Resolution: Automatically resolves provider aliases via official .NET [ProviderAlias] attributes or custom provider mappings.

Installation

Install via the .NET CLI:

dotnet add package ActDim.Observability

Or via Package Manager Console:

Install-Package ActDim.Observability

Registration

Register observability in your IServiceCollection:

services.AddEventObservability(logging =>
{
    logging.AddConsole();
}, options =>
{
    options.IncludeExternalScopes = false; // Default: false
});

Usage

1. Status & Progress Reporting

var observability = serviceProvider.GetRequiredService<IObservabilityContext>();

using (observability.SetStatus("Downloading Dataset", icon: "🚀"))
using (observability.SetProgress(45.5))
using (observability.Push("priority", "high"))
{
    logger.LogInformation("Importing rows into database");
}

2. Selective Provider Suppression

// Suppress Console logger output while preserving Activity traces and other logger sinks
using (observability.SuppressConsole())
{
    logger.LogInformation("Log without console output");
}

// Suppress specific providers by alias or name (e.g., "File", "Console")
using (observability.SuppressProviders("File", "Console"))
{
    logger.LogInformation("Log without File and Console outputs");
}

Testing & Quality

  • Test Suite: ActDim.Observability.Tests
  • Total Tests: 28 passed (100% success rate, 0 failed, 0 skipped)
  • Target Framework: .NET 10.0
dotnet test Tests/Observability.Tests/ActDim.Observability.Tests.csproj

License

This project is licensed under the MIT License.

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

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
1.0.10 51 8/26/2026
1.0.9 68 8/25/2026
1.0.8 67 8/25/2026
1.0.7 94 8/20/2026
1.0.6 87 8/19/2026
1.0.5 84 8/19/2026
1.0.4 83 8/19/2026
1.0.3 89 8/18/2026
1.0.2 92 8/18/2026
1.0.1 81 8/17/2026
1.0.0 83 8/17/2026