Guidance regarding diagnostics:
We do not advise turning this off as we frequently ask to share this file for support cases.
If you really want to disable it then you can do what the snippet shows at Startup diagnostics • NServiceBus • Particular Docs
endpointConfiguration.CustomDiagnosticsWriter(diagnostics => Task.CompletedTask);
Again, we would not advise this. It is highly recommended to store the diagnostic file and log files. Maybe not in the container but to a remote destination.
If you are not yet overriding logging I highly recommend using Microsoft.Extensions.Logging:
An alternative to using the diagnostics file is to write it via a logger.
– Ramon