Nancy.OpenTracing
0.1.1
dotnet add package Nancy.OpenTracing --version 0.1.1
NuGet\Install-Package Nancy.OpenTracing -Version 0.1.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="Nancy.OpenTracing" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nancy.OpenTracing --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nancy.OpenTracing, 0.1.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.
// Install Nancy.OpenTracing as a Cake Addin #addin nuget:?package=Nancy.OpenTracing&version=0.1.1 // Install Nancy.OpenTracing as a Cake Tool #tool nuget:?package=Nancy.OpenTracing&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
.NETFramework 4.6.1
- Nancy (>= 1.4.1)
- OpenTracing (>= 0.12.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Modified the default HTTP span name to be
```
HTTP {METHOD} {PATH}
```
So spans should now be reported as "HTTP POST /myapi/v1/{entityId}"