REslava.Result.OpenTelemetry
1.46.1
Prefix Reserved
See the version list below for details.
dotnet add package REslava.Result.OpenTelemetry --version 1.46.1
NuGet\Install-Package REslava.Result.OpenTelemetry -Version 1.46.1
<PackageReference Include="REslava.Result.OpenTelemetry" Version="1.46.1" />
<PackageVersion Include="REslava.Result.OpenTelemetry" Version="1.46.1" />
<PackageReference Include="REslava.Result.OpenTelemetry" />
paket add REslava.Result.OpenTelemetry --version 1.46.1
#r "nuget: REslava.Result.OpenTelemetry, 1.46.1"
#:package REslava.Result.OpenTelemetry@1.46.1
#addin nuget:?package=REslava.Result.OpenTelemetry&version=1.46.1
#tool nuget:?package=REslava.Result.OpenTelemetry&version=1.46.1
REslava.Result.OpenTelemetry
OpenTelemetry integration for REslava.Result. Seeds ResultContext from the active span and writes error tags as span attributes.
Installation
dotnet add package REslava.Result.OpenTelemetry
Requires REslava.Result ≥ 1.42.0.
What it does
| Method | Description |
|---|---|
.WithOpenTelemetry() |
Seeds ResultContext.CorrelationId from Activity.Current.TraceId and OperationName from Activity.Current.DisplayName. No-op when no active span. |
.WriteErrorTagsToSpan() |
On failure, writes each error.Tags entry as a span attribute via Activity.Current.SetTag(). No-op when no active span or result is success. |
Both methods return the original result unchanged — safe to inline in a pipeline.
Quick Start
using REslava.Result.OpenTelemetry;
var result = await FindUser(userId)
.WithOpenTelemetry() // seed CorrelationId + OperationName from active span
.BindAsync(EnrichUser)
.EnsureAsync(IsActive, new ForbiddenError())
.WriteErrorTagsToSpan(); // write error tags to span on failure
Context propagation
.WithOpenTelemetry() integrates with ResultContext — the context then propagates automatically through Bind, Map, Ensure, and other pipeline operators. Error enrichment happens at the end of the pipeline, not at each step.
// What gets set on ResultContext:
// CorrelationId = Activity.Current.TraceId.ToString()
// OperationName = Activity.Current.DisplayName
Zero-cost when inactive
All methods check Activity.Current == null and return immediately — no allocations, no reflection, no overhead outside of an active OpenTelemetry span.
Documentation
Full documentation: reslava.github.io/nuget-package-reslava-result
MIT License | .NET 8 / 9 / 10
| 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
- REslava.Result (>= 1.46.1)
-
net8.0
- REslava.Result (>= 1.46.1)
-
net9.0
- REslava.Result (>= 1.46.1)
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.54.0 | 113 | 4/6/2026 |
| 1.53.0 | 101 | 4/5/2026 |
| 1.52.0 | 109 | 3/30/2026 |
| 1.51.0 | 121 | 3/28/2026 |
| 1.50.1 | 99 | 3/25/2026 |
| 1.50.0 | 101 | 3/25/2026 |
| 1.49.0 | 99 | 3/24/2026 |
| 1.48.0 | 96 | 3/22/2026 |
| 1.47.5 | 95 | 3/22/2026 |
| 1.47.4 | 94 | 3/21/2026 |
| 1.47.3 | 96 | 3/20/2026 |
| 1.47.2 | 96 | 3/20/2026 |
| 1.47.1 | 95 | 3/18/2026 |
| 1.47.0 | 100 | 3/18/2026 |
| 1.46.3 | 99 | 3/18/2026 |
| 1.46.2 | 97 | 3/18/2026 |
| 1.46.1 | 95 | 3/17/2026 |
| 1.46.0 | 96 | 3/17/2026 |
| 1.45.0 | 101 | 3/17/2026 |
| 1.44.1 | 113 | 3/16/2026 |