NServiceBus.SimpleMonitoring 6.0.0-rc.1

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

NServiceBus.SimpleMonitoring

Adds some additional diagnostics to NServiceBus 10, 9, 8, 7, 6 and 5.

Version compatibility

NServiceBus NServiceBus.SimpleMonitoring
v5.x v1.x
v6.x v2.x
v7.x v3.x
v8.x v4.x
v9.x v5.x
v10.x v6.x

Please note that there might be versions targeting other NServiceBus versions. Please check the Releases for all versions. or check the root of the master branch of the repository.

Use cases

Additional processing duration information about processed messages is written to the log. A threshold can be configured so that a Warning log entry will be written indicating that a message is still processing. For example, a message should take less then 10 seconds to be processed, if it takes longer a Warning log entry is written while the message is still being processed. Messages that hang an endpoint can now easily be identified. When a message completes processing its total processing duration is written to the log with level Debug but a message that took more then the threshold will also be logged with log level Warning.

Log event examples

Log event written for every completed message:

DEBUG NServiceBus.SimpleMonitoring Message '000526b2-44cd-4d6d-9aa3-a8ad0126e6e6' total processing duration: '0:00:00,1349758'

Log event written for completed messages where the duration exceeds the threshold:

WARN NServiceBus.SimpleMonitoring Message '6625296c-50b1-4f07-ac90-a8ad0127304a' total processing duration (0:00:23,0370282) is larger than the threshold '0:00:15'.

Log event written every interval for each message currently being processed but exceeding the threshold

WARN NServiceBus.SimpleMonitoring Message '6625296c-50b1-4f07-ac90-a8ad0127304a' is already running for '0:00:20,1372179' which is larger than the thresshold '0:00:15'.

Note that the formatting of the log events is different per used logging framework but the message part is the same.

Installation

Via Nuget

Install the Nuget package NServiceBus.SimpleMonitoring

Zero configuration and deployment

Alternatively, download the nuget package, extract the DLL and drop-in the DLL in the endpoint installation path and restart the endpoint. Assembly scanning ensures this module will get auto loaded and enabled using default configuration values.

Migrating to NServiceBus 11

In NServiceBus 10.x, this feature is still auto-enabled via assembly scanning. NServiceBus 11 will remove assembly scanning of features, so EnableByDefault() will stop working. To ensure a smooth upgrade, explicitly call ReportLongRunningMessages() on your EndpointConfiguration:

endpointConfiguration.ReportLongRunningMessages(TimeSpan.FromMinutes(3));

Configuration

Set the Warning threshold

The default warning threshold is 15 seconds.

The threshold value can be configured via code or via IConfiguration. The code API takes precedence.

Via code:

endpointConfiguration.ReportLongRunningMessages(TimeSpan.FromMinutes(3));

Via IConfiguration (e.g. appsettings.json):

{
  "NServiceBus": {
    "SimpleMonitoring": {
      "WarningThresholdInSeconds": 180
    }
  }
}

IConfiguration support requires hosting via NServiceBus.Extensions.Hosting, which registers IConfiguration in the dependency injection container. The threshold is read automatically as a fallback when the code API is not used.

Show durations for all messages

Message processing durations are always logged with log level Debug however the default NServiceBus log level is Info since version 5. Please set the NServiceBus logging log level to Debug if this is required.

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. 
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
6.0.0-rc.1 72 2/15/2026
5.0.0 451 6/14/2024
4.0.0 4,496 12/10/2022
3.1.0 1,170 12/9/2022
3.0.0 9,283 4/26/2019
2.0.0 478 12/10/2022
2.0.0-rc1 1,581 3/24/2018 2.0.0-rc1 is deprecated because it is no longer maintained.
1.0.0 456 12/10/2022
1.0.0-rc2 1,853 3/24/2018 1.0.0-rc2 is deprecated because it is no longer maintained.
1.0.0-rc1 1,530 12/20/2017 1.0.0-rc1 is deprecated because it is no longer maintained.