Rig.TUnit.Observability 0.1.0-beta.2

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

Rig.TUnit.Observability

Observability family-base: ITelemetryRig, TelemetryFixtureBase, TelemetryRigBuilder<TSelf> — shared shape with deterministic IsolationKey / ServiceName.

What this package is

The shared contract for every Observability provider (.AppInsights, .Logging, .Logging.Analyzers, .Metrics, .Seq, .Tracing). Defines ITelemetryRig, TelemetryFixtureBase, and TelemetryRigBuilder<TSelf> so every provider threads IsolationKey into its ServiceName tag / resource attribute. Without this consistent thread, traces and logs from parallel tests become inscrutable.

Install one of the leaves directly for concrete testing.

When to use it

  • Authoring a new telemetry provider.
  • Writing provider-agnostic observability helpers.
  • Not for: concrete telemetry — install a leaf.

Prerequisites

  • .NET 10 SDK

Quick start

using Rig.TUnit.Observability.Fixtures;

public sealed class MyFixture : TelemetryFixtureBase
{
    public override string ConnectionString => string.Empty;
    public override Task InitializeAsync() => Task.CompletedTask;
    public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
}

Options

Property Type Default Description
ServiceName string $"rigtunit-{IsolationKey}" Resource attribute / activity source
ServiceVersion string "0.0.0-test" OTEL resource version
EnableAutoInstrumentation bool true Attach ASP.NET Core / HttpClient instrumentations

Fixture + helper APIs

  • Rig.TUnit.Observability.ITelemetryRig
  • Rig.TUnit.Observability.Fixtures.TelemetryFixtureBase
  • Rig.TUnit.Observability.Builder.TelemetryRigBuilder<TSelf>

Per-test isolation

ServiceName includes IsolationKey so every test's telemetry has a unique provenance. Safe under full parallelism.

Parallelism + performance

§9 — N/A: family-base; per-provider cost. Logging/Tracing overhead

is a few µs/event; Seq involves network I/O.

Troubleshooting

  • Trace context leaks across tests — ensure Activity.Current is reset at test boundaries; the TelemetryFixtureBase disposer handles this for fixtures that derive from it.

See docs/troubleshooting.md.

Provider quirks + edge cases

  • OpenTelemetry is the common thread — Seq is an OTEL sink; Tracing is an OTEL processor; AppInsights is an OTEL exporter. Consistent resource attributes are essential.

Benchmarks

§12 — N/A: family-base; concrete leaves have individual

*Benchmarks.cs entries under tests/Rig.TUnit.Benchmarks/.

License

MIT. See 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 (6)

Showing the top 5 NuGet packages that depend on Rig.TUnit.Observability:

Package Downloads
Rig.TUnit.Observability.Tracing

TUnit fixture for OpenTelemetry traces - Activity capture, parent-child propagation, and cross-boundary correlation assertions.

Rig.TUnit.Observability.Seq

TUnit fixture for Seq backed by Testcontainers. End-to-end log pipeline assertions against a real Seq instance.

Rig.TUnit.Observability.Metrics

TUnit fixture for System.Diagnostics.Metrics - meter/instrument capture, histogram-bucket assertions.

Rig.TUnit.All

Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices).

Rig.TUnit.Observability.Logging

TUnit fixture for ILogger-based assertions - captured-log buffer, level filters, scope-aware queries.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-beta.2 49 4/27/2026
0.0.0-alpha.0.14 55 4/26/2026