Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Jun 14:56
v0.2.0
10ed831

[0.2.0] - 2026-06-14: kind, root, event, and count assertions; sampling control

Minor release. Adds span and capture assertions for ASP.NET Core span testing, plus a sampling-control capture overload. Purely additive.

Added

  • Span assertions: Assert.That(span).HasKind(ActivityKind) (for example Server for an inbound request span), IsRoot() (no parent), HasEvent(name), and HasExceptionEvent() (the OpenTelemetry "exception" event). The event assertions list the span's event names on failure.
  • Capture assertions: Assert.That(capture).HasNoSpan(operationName) (the inverse of HasSpan, for asserting an operation was never traced) and HasSpanCount(int).
  • SpanCapture.ForSource(name, ActivitySamplingResult) and ForSources(ActivitySamplingResult, params string[]) capture under a chosen sampling result. The existing parameterless forms still force AllDataAndRecorded. A lower result (for example PropagationData) lets a test exercise code that branches on Activity.IsAllDataRequested, with the documented caveat that an activity's effective sampling is the maximum across all active listeners, so this takes effect only when the capture is the sole listener.

Changed

  • Bumped PackageValidationBaselineVersion from 0.1.0 to 0.1.2 on both packages so ApiCompat strict-mode validates 0.2.0 against the most recently published baseline.