Nancy.OpenTracing 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nancy.OpenTracing --version 0.1.0
                    
NuGet\Install-Package Nancy.OpenTracing -Version 0.1.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="Nancy.OpenTracing" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nancy.OpenTracing" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Nancy.OpenTracing" />
                    
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 Nancy.OpenTracing --version 0.1.0
                    
#r "nuget: Nancy.OpenTracing, 0.1.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 Nancy.OpenTracing@0.1.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=Nancy.OpenTracing&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Nancy.OpenTracing&version=0.1.0
                    
Install as a Cake Tool

Nancy.OpenTracing

This library adds OpenTracing middleware for NancyFX.

To use this class, simply inherit from the OpenTracingBootstrap base class in your Nancy startup and create an ITracer instance to pass into it:

 // arrange
  var mockTracer = new MockTracer();
  var bootstrapper = new OpenTracingBootstrapper(mockTracer);
  var browser = new Browser(bootstrapper);

  // act
  var resp = browser.Get("/test");

  // assert
  Assert.Equal("hello", resp.Body.AsString());
  var finishedSpans = mockTracer.FinishedSpans();
  finishedSpans.Count.Should().Be(2); // two spans expected

  // both spans should be part of the same trace
  finishedSpans.Select(x => x.Context.TraceId).Distinct().Count().Should().Be(1);
Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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
0.1.1 482 10/8/2021
0.1.0 405 10/8/2021

Fist implementation of Nancy.OpenTracing, designed to work with Nancy 1.4.1 and OpenTracing 0.12.1.