Back to Quartznet

Opentracing Integration

docs/documentation/quartz-3.x/packages/opentracing-integration.md

3.18.11.1 KB
Original Source

Quartz.OpenTracing provides integration with OpenTracing. You may also consider Quartz.OpenTelemetry.Instrumentation package which will supercede OpenTracing and OpenCensus when OpenTelemetry project reaches maturity.

::: tip Quartz 3.2.3 or later required. :::

::: danger The integration library can still live a bit and thus integration API can have breaking changes and change behavior. :::

Installation

You need to add NuGet package reference to your project which uses Quartz.

Install-Package Quartz.OpenTracing

Using

You can add Quartz configuration by invoking an extension method AddQuartzOpenTracing on IServiceCollection.

Example Startup.ConfigureServices configuration

csharp
public void ConfigureServices(IServiceCollection services)
{
    // make sure you configure logging and OpenTracing before quartz services
    services.AddQuartzOpenTracing(options =>
    {
        // these are the defaults
        options.ComponentName = "Quartz";
        options.IncludeExceptionDetails = false;
    });
}