question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`fatal` Logs from `Microsoft.AspNetCore.Hosting.Diagnostics` should be marked as unhandled

See original GitHub issue

Problem Statement

When Hosting crashes, it uses M.E.L to log the fatal message. The SDK is able to capture that, but doesn’t flag the exception with any mechanism or handled:false which Sentry uses to tell apart ‘crashes’ from user handled errors:

https://sentry.io/share/issue/d0770225d93e4e5dba8fb75caa95d03f/

Solution Brainstorm

Suggestion: In M.E.L, special case fatal level + category (logger) such as Microsoft.AspNetCore.Hosting.Diagnostics to mark exceptions as handled:false.

Alternatively we could consider all level=fatal as handled:false, but I’m not sure of the consequences

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonCroppcommented, Jun 27, 2022

level=fatal as handled:false

my instinct says to use this approach, and deal with the consequences as they come up

can u think of an cases where " level=fatal as handled:false" would be the wrong approach?

0reactions
mattjohnsonpintcommented, Sep 29, 2022

isnt this what AspNetCoreExceptionProcessor does?

It would appear so. Though I don’t see any reference to fatal.

We need a better repro of the problem to move this forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET core startup fatal error - impossible to run the ...
AggregateException was unhandled HResult=-2146233088 Message=An error occurred while writing to logger(s). Source=Microsoft.Extensions.
Read more >
Handle errors in ASP.NET Core
Discover how to handle errors in ASP.NET Core ... Catches and logs unhandled exceptions. ... The hosting layer logs a critical exception.
Read more >
Logging in .NET Core and ASP.NET Core
Learn how to use the logging framework provided by the Microsoft.Extensions.Logging NuGet package.
Read more >
Exception Class (System)
An application or library that encounters a fatal exception. The exception handler can log the exception and then re-throw the exception. The recommended...
Read more >
How to get logs from the .NET Core agent
NET Core agent logs information to the logs folder within C:\ProgramData\Contrast\dotnet-core\ on Windows or /var/tmp/contrast/dotnet-core/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found