NServiceBus
NServiceBus copied to clipboard
Log process duration for failures and store relavant environment timeout values in diagnostics file
Describe the suggested improvement
Is your improvement related to a problem? Please describe.
When timeout related errors occurs it helps to know how long a message was being processed.
Take the following TransactionAbortedException / TimeoutException, having the processing duration helps diagnose what the timeout value is:
Describe the suggested solution
- Log duration as part of the error. NServiceBus already has OpenTelemetry and a stopwatch running.
- Have Core and Transports add environment values for detected timeouts into the diagnostics file
- Core: TransactionScope enabled? -> Log default timeout duration
- Transport: SQLT -> Command Timeout, and other values, if not detectable write "default" or "unknown"
Additional Context
No response