Bit.Belemetry.Hangfire 11.0.0

dotnet add package Bit.Belemetry.Hangfire --version 11.0.0
                    
NuGet\Install-Package Bit.Belemetry.Hangfire -Version 11.0.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="Bit.Belemetry.Hangfire" Version="11.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bit.Belemetry.Hangfire" Version="11.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Bit.Belemetry.Hangfire" />
                    
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 Bit.Belemetry.Hangfire --version 11.0.0
                    
#r "nuget: Bit.Belemetry.Hangfire, 11.0.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 Bit.Belemetry.Hangfire@11.0.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=Bit.Belemetry.Hangfire&version=11.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Bit.Belemetry.Hangfire&version=11.0.0
                    
Install as a Cake Tool

Bit.Belemetry.Hangfire

Hangfire spans and metrics for Bit.Belemetry: a job filter that records a span for every job execution (JOB {Type}.{Method}, kind consumer, with job.id, job.type, job.method, job.queue and job.created_at), parented to the trace that enqueued the job - the W3C trace context travels in the job's parameters - and marked as an error when the job throws. The spans land on the Bit.Belemetry.Hangfire activity source, which Bit.Belemetry collects by default, and show up in Application Insights as requests.

Hangfire.Core has no meter of its own, so the package measures the jobs too, on the Bit.Belemetry.Hangfire meter (collected by default as well):

Instrument Kind Attributes
hangfire.job.executions counter, {execution} job.type, job.method, job.outcome (succeeded/failed/canceled), error.type (unless it succeeded)
hangfire.job.duration histogram, s the same
hangfire.jobs.enqueued, .processing, .scheduled, .failed, .retries gauges, {job} none

The execution metrics count every execution the filter keeps, whether or not its trace is sampled. canceled is a job aborted while it ran or stopped by the server's shutdown; a job another filter cancels before it runs is not counted. The gauges read GetMonitoringApi().GetStatistics() of o.Storage, else JobStorage.Current, once per collection (cached for a second after the query ends, so the five share one query). They report nothing when the query fails, and a failed query is not retried for 30 seconds; .retries reports nothing on a storage that does not count retries. They describe the whole storage, so every instance reports the same values: a dashboard takes their maximum, not their sum.

using Bit.Belemetry;   // UseBitBelemetry

services.AddHangfire(configuration => configuration
    .UseSqlServerStorage(connectionString)
    .UseBitBelemetry(o =>
    {
        o.PropagateTraceContext = true;                       // the enqueue's trace is the execution's parent
        o.Filter = job => job.Type != typeof(HeartbeatJob);   // skip the noisy ones (no span, not counted)
        o.StorageMetrics = true;                              // the hangfire.jobs.* gauges
        o.Storage = null;                                     // the storage they read; null is JobStorage.Current
    }));

No OpenTelemetry packages are involved: the filter starts plain System.Diagnostics.Activity instances and records on a plain System.Diagnostics.Metrics.Meter, so any ActivityListener or MeterListener - the OpenTelemetry SDK included - can record them too. See the Belemetry documentation for the rest.

Product Compatible and additional computed target framework versions.
.NET 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.  net11.0 is compatible. 
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
11.0.0 0 12/2/2026
11.0.0-pre-26 295 11/30/2026
11.0.0-pre-25 872 11/26/2026
11.0.0-pre-24 496 11/25/2026
11.0.0-pre-23 273 11/19/2026
11.0.0-pre-22 270 11/18/2026
11.0.0-pre-21 212 11/17/2026
11.0.0-pre-20 688 11/15/2026
11.0.0-pre-19 129 11/13/2026
11.0.0-pre-18 86 11/11/2026
11.0.0-pre-17 93 11/4/2026
11.0.0-pre-16 111 11/2/2026
11.0.0-pre-15 98 10/27/2026
11.0.0-pre-14 89 10/26/2026
11.0.0-pre-13 89 10/26/2026
11.0.0-pre-12 86 10/26/2026
11.0.0-pre-11 92 10/25/2026
10.7.0 120 10/25/2026
10.7.0-pre-04 93 10/25/2026
10.7.0-pre-03 94 10/22/2026
Loading failed