Application Insights

Trace logging with exception in Application Insights

By default, Masstransit logs retries as warnings if they are resolved by the retry process; otherwise, they are logged as errors. Additionally, Masstransit provides the exception in both cases for tracing purposes.

However, there’s a potential confusion when using Application Insights: it logs every entry with a supplied exception as an exception with an Exception severity level. Unfortunately, the severity level isn’t a presented field in the AI user interface, making it easy to overlook. Both our sysops and we developers misinterpret these logged entries as actual exceptions, which led to unnecessary investigation and troubleshooting.

To mitigate this confusion, remember that you can filter out these non-exceptional logs by specifying the severity level. Specifically, filtering for “Error” severity level will narrow down the logs to actual exceptions.

I hope this blog post can save others some valuable time and prevent unnecessary confusion and alarm. Happy coding!