Franz.Common.Mediator.OpenTelemetry 2.3.0

dotnet add package Franz.Common.Mediator.OpenTelemetry --version 2.3.0
                    
NuGet\Install-Package Franz.Common.Mediator.OpenTelemetry -Version 2.3.0
                    
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="Franz.Common.Mediator.OpenTelemetry" Version="2.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Mediator.OpenTelemetry" Version="2.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Mediator.OpenTelemetry" />
                    
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 Franz.Common.Mediator.OpenTelemetry --version 2.3.0
                    
#r "nuget: Franz.Common.Mediator.OpenTelemetry, 2.3.0"
                    
#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 Franz.Common.Mediator.OpenTelemetry@2.3.0
                    
#: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=Franz.Common.Mediator.OpenTelemetry&version=2.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Mediator.OpenTelemetry&version=2.3.0
                    
Install as a Cake Tool

Franz.Common.OpenTelemetry

OpenTelemetry integration for the Franz Framework. This package provides automatic distributed tracing across applications using the Franz ecosystem, including Mediator pipelines, HTTP calls, and custom instrumentation.

  • Current Version: v2.3.0
  • Part of the private Franz Framework ecosystem.

๐Ÿš€ Whatโ€™s New in v2.0.1 โ€“ Internal Modernization

  • Messaging and infrastructure refactored for async, thread-safety, and modern .NET 10 patterns.
  • All APIs remain fully backward compatible.
  • Tests, listeners, and pipeline components modernized.

โšก Features

  • Automatic tracing for all Mediator requests via OpenTelemetryPipeline.

  • Enriched context tags for every span:

    • franz.correlation_id
    • franz.user_id
    • franz.tenant_id
    • franz.culture
    • franz.environment
    • franz.metadata.* (custom metadata values)
  • Error tagging: exceptions automatically recorded in spans.

  • Environment-aware: adjusts configuration between dev/test/prod automatically.

  • Logging correlation: spans and Serilog logs share the same enrichment keys.

  • Flexible exporters: Console (optional), OTLP, Jaeger, or Zipkin.

  • Sampling control: configurable via FranzTelemetryOptions or environment defaults.


๐Ÿ›  Usage

1. Register Franz Mediator with OpenTelemetry

builder.Services
    .AddFranzMediator()
    .AddMediatorOpenTelemetry("Franz.Mediator");

Thatโ€™s it. No manual OpenTelemetry setup is required. All exporters, sampling, and instrumentation are configured internally.

2. Optional Configuration via FranzTelemetryOptions

"Franz": {
  "Telemetry": {
    "OtlpEndpoint": "http://otel-collector:4317",
    "ExportToConsole": false,
    "SamplingRatio": 0.5,
    "ServiceName": "MyService"
  }
}
  • OTLP endpoint is mandatory in production โ€” fail-fast enforced.
  • Console exporter is typically used in development only.
  • Sampling ratio can be tuned per environment.

๐Ÿ“Š Example Trace

Name: Mediator CreateBookCommand
Kind: Internal
Status: OK
Tags:
 +- franz.correlation_id: 13a6f212-b48f-41a5-97b8-cc6dd875db94
 +- franz.user_id: 42
 +- franz.tenant_id: library-001
 +- franz.culture: en-US
 +- franz.environment: Development
 +- franz.metadata.request_size: 3kb

๐Ÿ›ฃ Roadmap

  • Export Polly resilience metrics as OTEL counters & histograms.
  • Full trace correlation between HTTP, Mediator, and DB layers.
  • Prebuilt dashboards for Prometheus + Grafana.
  • Unified logging + tracing observability across all Franz applications.
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

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
2.3.0 116 7/21/2026
2.2.19 107 7/19/2026
2.2.18 107 7/19/2026
2.2.17 109 7/12/2026
2.2.16 114 7/2/2026
2.2.15 116 6/29/2026
2.2.14 102 6/29/2026
2.2.13 114 6/29/2026
2.2.12 108 6/28/2026
2.2.11 109 6/28/2026
2.2.10 117 6/28/2026
2.2.9 125 6/28/2026
2.2.8 108 6/28/2026
2.2.7 111 6/7/2026
2.2.6 117 6/6/2026
2.2.5 119 6/4/2026
2.2.4 113 6/3/2026
2.2.3 114 6/2/2026
2.2.2 120 6/2/2026
2.2.1 115 5/24/2026
Loading failed