KnightBus.OpenTelemetry
1.0.0-alpha-1
This is a prerelease version of KnightBus.OpenTelemetry.
dotnet add package KnightBus.OpenTelemetry --version 1.0.0-alpha-1
NuGet\Install-Package KnightBus.OpenTelemetry -Version 1.0.0-alpha-1
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="KnightBus.OpenTelemetry" Version="1.0.0-alpha-1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KnightBus.OpenTelemetry" Version="1.0.0-alpha-1" />
<PackageReference Include="KnightBus.OpenTelemetry" />
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 KnightBus.OpenTelemetry --version 1.0.0-alpha-1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: KnightBus.OpenTelemetry, 1.0.0-alpha-1"
#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 KnightBus.OpenTelemetry@1.0.0-alpha-1
#: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=KnightBus.OpenTelemetry&version=1.0.0-alpha-1&prerelease
#tool nuget:?package=KnightBus.OpenTelemetry&version=1.0.0-alpha-1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
KnightBus.OpenTelemetry
OpenTelemetry instrumentation for KnightBus message processing.
Features
- Automatic span creation for each processed message
- W3C Trace Context propagation across message boundaries
- Exception recording with stack traces
- Message properties as span tags
Installation
dotnet add package KnightBus.OpenTelemetry
Usage
1. Register KnightBus OpenTelemetry
services.UseOpenTelemetry();
2. Configure OpenTelemetry to capture KnightBus traces
services.AddOpenTelemetry()
.WithTracing(builder => builder
.AddKnightBusInstrumentation()
.AddOtlpExporter());
Zero-Code Instrumentation
If using the OpenTelemetry .NET Automatic Instrumentation, register the KnightBus source via environment variable:
export OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES="KnightBus"
Span Attributes
Each message processing span includes:
| Attribute | Description |
|---|---|
messaging.system |
knightbus |
messaging.operation |
process |
messaging.destination.name |
Full type name of the message |
messaging.knightbus.* |
Message properties |
Distributed Tracing
Trace context is automatically propagated via message properties using W3C Trace Context format (traceparent/tracestate headers). This enables end-to-end tracing across services communicating via KnightBus.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- KnightBus.Core (>= 17.2.0)
- OpenTelemetry.Api (>= 1.14.0)
-
net9.0
- KnightBus.Core (>= 17.2.0)
- OpenTelemetry.Api (>= 1.14.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on KnightBus.OpenTelemetry:
| Package | Downloads |
|---|---|
|
KnightBus.Examples.Azure.ServiceBus.Producer
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha-1 | 219 | 12/16/2025 |