AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/nservicebus/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Startup diagnostics

Component:
NServiceBus
NuGet Package:
NServiceBus 8.x
Standard support for version 8.x of NServiceBus has expired. For more information see our Support Policy.

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

To change the output path:

endpointConfiguration.SetDiagnosticsPath("myCustomPath");

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

Sample content

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

{
  "Container": {
    "Type": "internal"
  },
  "Endpoint": {
    "Name": "StartUpDiagnosticsWriter",
    "SendOnly": false,
    "NServiceBusVersion": "8.0.0"
  },
  "Features": [
    {
      "Name": "NServiceBus.ReceiveStatisticsFeature",
      "EnabledByDefault": true,
      "Active": true,
      "PrerequisiteStatus": {
        "IsSatisfied": true,
        "Reasons": []
      },
      "Dependencies": [],
      "Version": "8.0.0",
...

Writing to other targets

To take full control of how diagnostics are written:

endpointConfiguration.CustomDiagnosticsWriter(
    (diagnostics, ct) =>
    {
        //custom logic to write data
        return Task.CompletedTask;
    });

Adding startup diagnostics sections

To extend the startup diagnostics with custom sections:

settings.AddStartupDiagnosticsSection(
    sectionName: "MySection",
    section: new
    {
        SomeSetting = "some data",
        SomeOtherSetting = 10
    });

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