Startup diagnostics

Component: NServiceBus
NuGet Package NServiceBus (7.1-pre)
This page targets a pre-release version and is subject to change prior to the final release.

To make troubleshooting easier, diagnostic information is collected during endpoint startup and written to a .diagnostics sub-folder in the host output directory.

By default, the output directory is called AppDomain.CurrentDomain.BaseDirectory, except for web applications where App_Data is used instead.

To change the output path:

7.x NServiceBus

At every endpoint startup the current diagnostics will be written to {endpointName}-configuration.txt. If possible, attach this file to support requests.

The structure and format of the data produced should not be considered stable or parsable. Nodes may be added, removed, or moved in minor and patch versions.

Sample content

Sample partial content of the startup diagnostics (formatted for readability):

7.x NServiceBus
  "AssemblyScanning": {
    "Assemblies": [
      "NServiceBus.Core, Version=, Culture=neutral, PublicKeyToken=9fc386479f8a226c"
    "ErrorsThrownDuringScanning": false,
    "SkippedFiles": []
  "Transport": {
    "Type": "NServiceBus.LearningTransport",
    "Version": "7.0.0"
  "Recoverability": {
    "ImmediateRetries": 5,
    "DelayedRetries": 3,
    "DelayedRetriesTimeIncrease": "0:00:10",
    "ErrorQueue": "error",
    "UnrecoverableExceptions": [

Writing to other targets

To take full control of how diagnostics are written:

7.x NServiceBus
    diagnostics =>
        //custom logic to write data
        return Task.CompletedTask;

Adding startup diagnostics sections

To extend the startup diagnostics with custom sections:

7.x NServiceBus
    sectionName: "MySection",
    section: new
        SomeSetting = "some data",
        SomeOtherSetting = 10

Settings can be accessed from a feature or via the endpoint configuration.

Last modified