XBullet.EasyTesting.Observability
1.0.7
See the version list below for details.
dotnet add package XBullet.EasyTesting.Observability --version 1.0.7
NuGet\Install-Package XBullet.EasyTesting.Observability -Version 1.0.7
<PackageReference Include="XBullet.EasyTesting.Observability" Version="1.0.7" />
<PackageVersion Include="XBullet.EasyTesting.Observability" Version="1.0.7" />
<PackageReference Include="XBullet.EasyTesting.Observability" />
paket add XBullet.EasyTesting.Observability --version 1.0.7
#r "nuget: XBullet.EasyTesting.Observability, 1.0.7"
#:package XBullet.EasyTesting.Observability@1.0.7
#addin nuget:?package=XBullet.EasyTesting.Observability&version=1.0.7
#tool nuget:?package=XBullet.EasyTesting.Observability&version=1.0.7
XBullet.EasyTesting.Observability
Structured logs, distributed traces, metrics, and deterministic time for XBullet integration-test scenarios.
The package targets .NET 8, .NET 9, and .NET 10.
Install
dotnet add package XBullet.EasyTesting.Observability
Example
using var factory = EasyTestHost.Create<Program>()
.UseObservability(options => options
.UseFakeTime(new DateTimeOffset(2030, 1, 1, 0, 0, 0, TimeSpan.Zero))
.CaptureActivitySource("Orders")
.CaptureMeter("Orders"))
.Build();
await using var scope = await factory.CreateTestScenarioScopeAsync();
var observability = scope.GetObservability();
observability.Time!.Advance(TimeSpan.FromMinutes(5));
observability.Logs.Should()
.ContainMessage("Order processed", LogLevel.Information);
observability.Activities.Should()
.ContainActivity("ProcessOrder", ActivityStatusCode.Ok, "Orders");
observability.Metrics.Should()
.ContainMeasurement("orders.processed", 1L, "Orders");
Log entries retain their category, level, event ID, message template, structured state, scopes,
formatted message, exception, and capture timestamp. Completed activities retain trace and span
identifiers, status, tags, baggage, and events. Metric measurements retain instrument metadata,
values, tags, and capture timestamps; call CollectObservableMeasurements() when an observable
instrument should be sampled explicitly.
All three collectors are bounded and included in scenario failure diagnostics before the host and observability resource are disposed. Activity-source and meter filters are exact-name allowlists; when no names are configured, all sources and meters are captured.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.TimeProvider.Testing (>= 10.10.0)
- XBullet.EasyTesting (>= 1.0.7)
-
net8.0
- Microsoft.Extensions.TimeProvider.Testing (>= 8.10.0)
- XBullet.EasyTesting (>= 1.0.7)
-
net9.0
- Microsoft.Extensions.TimeProvider.Testing (>= 9.10.0)
- XBullet.EasyTesting (>= 1.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.