Rig.TUnit.Observability
0.1.0-beta.2
dotnet add package Rig.TUnit.Observability --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Observability -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Observability" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Observability" Version="0.1.0-beta.2" />
<PackageReference Include="Rig.TUnit.Observability" />
paket add Rig.TUnit.Observability --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Observability, 0.1.0-beta.2"
#:package Rig.TUnit.Observability@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Observability&version=0.1.0-beta.2&prerelease
#tool nuget:?package=Rig.TUnit.Observability&version=0.1.0-beta.2&prerelease
Rig.TUnit.Observability
Observability family-base:
ITelemetryRig,TelemetryFixtureBase,TelemetryRigBuilder<TSelf>— shared shape with deterministicIsolationKey/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.ITelemetryRigRig.TUnit.Observability.Fixtures.TelemetryFixtureBaseRig.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.Currentis reset at test boundaries; theTelemetryFixtureBasedisposer handles this for fixtures that derive from it.
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/.
Related docs
License
MIT. See LICENSE.
| Product | Versions 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. |
-
net10.0
- Bogus (>= 35.6.1)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Rig.TUnit.Core (>= 0.1.0-beta.2)
- TUnit.Core (>= 1.34.5)
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 |