-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
We are enabling Microsoft.Extensions.Logging ETW events and collecting the ETW Trace using Perfview by following these steps
Then we create a Controller and throw an exception in that and capture the ETW events using PerfView and filter only on ExceptionHandlerMiddleware event and we see this.
| Microsoft-Extensions-Logging/FormattedMessage | 24,601.538 | ThreadID="28,588" ProcessorNumber="0" Level="4" FactoryID="1" LoggerName="Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware" EventId="1" EventName="UnhandledException" FormattedMessage="An unhandled exception has occurred while executing the request." ActivityID="/#14688/1/6/" |
|---|
The exception still shows under Message and MessageJson. Its missing only in FormattedMessage.
The expected behavior is that exception message still shows under FormattedMessage event so tools parsing the events can leverage this information.
Configuration
POST .NET Core 2.1
Regression?
This seems to be a regression after .NET Core 2.1. Prior versions of .NET Core used to have the real exception message under the FormattedMessage event but now all they contain is the string "An unhandled exception has occurred while executing the request"
Adding @maryamariyan as she can add more details if needed.