OpenTelemetry.Instrumentation.Quartz 1.13.0-beta.1

Prefix Reserved
This is a prerelease version of OpenTelemetry.Instrumentation.Quartz.
dotnet add package OpenTelemetry.Instrumentation.Quartz --version 1.13.0-beta.1
                    
NuGet\Install-Package OpenTelemetry.Instrumentation.Quartz -Version 1.13.0-beta.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="OpenTelemetry.Instrumentation.Quartz" Version="1.13.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenTelemetry.Instrumentation.Quartz" Version="1.13.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="OpenTelemetry.Instrumentation.Quartz" />
                    
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 OpenTelemetry.Instrumentation.Quartz --version 1.13.0-beta.1
                    
#r "nuget: OpenTelemetry.Instrumentation.Quartz, 1.13.0-beta.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 OpenTelemetry.Instrumentation.Quartz@1.13.0-beta.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=OpenTelemetry.Instrumentation.Quartz&version=1.13.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OpenTelemetry.Instrumentation.Quartz&version=1.13.0-beta.1&prerelease
                    
Install as a Cake Tool

QuartzNET Instrumentation for OpenTelemetry .NET

Status
Stability Beta
Code Owners @maldago

NuGet version badge NuGet download count badge codecov.io

Automatically instruments the Quartz jobs from Quartz.

Supported Frameworks

QuartzNET Instrumentation is only supported when using .NET Framework >= net472 and .NET Standard >= netstandard2.0. Quartznet461 support for activity sources has been removed, more information can be found here.

Installation

dotnet add package OpenTelemetry.Extensions.Hosting
dotnet add package --prerelease OpenTelemetry.Instrumentation.Quartz

Configuration

ASP.NET Core instrumentation example:

// Add QuartzNET inside ConfigureServices
public void ConfigureServices(IServiceCollection services)
{
    services.AddQuartz(q =>
    {
        // base quartz scheduler, job and trigger configuration
    });

    // ASP.NET Core hosting
    services.AddQuartzServer(options =>
    {
        // when shutting down we want jobs to complete gracefully
        options.WaitForJobsToComplete = true;
    });
}

// Add OpenTelemetry and Quartz instrumentation
services.AddOpenTelemetry().WithTracing(x =>
{
    x.AddQuartzInstrumentation();
    x.AddOtlpExporter(config => {
      // Configure OTLP
    });
});

Filter traced operations

This option allows you to filter trace operations.

For example you can trace only execute operations using this snippet:

// ...
using OpenTelemetry.Instrumentation.Quartz.Implementation;
// ...
x.AddQuartzInstrumentation(
    opts =>
        opts.TracedOperations = new
        HashSet<string>(new[] {
            OperationName.Job.Execute,
}));

For full operation list please see: OperationName.

All operations are enabled by default.

Enrich

This option allows one to enrich the activity with additional information from the raw JobDetail object. The Enrich action is called only when activity.IsAllDataRequested is true. It contains the activity itself (which can be enriched), the name of the event, and the actual raw object.

For event names "OnStartActivity", "OnStopActivity", the actual object will be IJobDetail.

For event name "OnException", the actual object will be the exception thrown

The following code snippet shows how to add additional tags using Enrich.

// ...
using OpenTelemetry.Instrumentation.Quartz.Implementation;
using Quartz;
// ...
// Enable enriching an activity after it is created.
x.AddQuartzInstrumentation(opt =>
{
    opt.Enrich = (activity, eventName, quartzJobDetails) =>
    {
        // update activity
        if (quartzJobDetails is IJobDetail jobDetail)
        {
            activity.SetTag("customProperty", jobDetail.JobDataMap["customProperty"]);
            ...
        }
    };
})

References

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on OpenTelemetry.Instrumentation.Quartz:

Package Downloads
OpenTelemetry.AutoInstrumentation.Runtime.Managed

Managed components used by the OpenTelemetry.AutoInstrumentation project.

Grafana.OpenTelemetry

Full Grafana distribution of OpenTelemetry .NET

Honeycomb.OpenTelemetry.CommonInstrumentations

Honeycomb's OpenTelemetry common instrumentations package. Adds support for many common instrumentation libraries for you.

Honeycomb.OpenTelemetry.AutoInstrumentations

Honeycomb's OpenTelemetry autoinstrumentations package. Adds support for many common instrumentation libraries for you.

LaunchDarkly.Observability

LaunchDarkly Observability for Server-Side .NET SDK

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on OpenTelemetry.Instrumentation.Quartz:

Repository Stars
ZaqueuCavalcante/syki
Full Education Management System.
Version Downloads Last Updated
1.13.0-beta.1 1,220 10/22/2025
1.12.0-beta.1 757,114 5/5/2025
1.11.0-beta.2 650,461 3/5/2025
1.11.0-beta.1 132,948 1/27/2025
1.10.0-beta.1 67,406 12/9/2024
1.0.0-beta.3 3,508,682 6/18/2024
1.0.0-beta.2 545,521 4/5/2024
1.0.0-beta.1 735,054 1/4/2024
1.0.0-alpha.3 1,251,693 6/9/2023
1.0.0-alpha.2 1,566,960 2/28/2023
1.0.0-alpha.1 1,163,699 3/14/2022