Skip to content

Exception handled in ExceptionHandler middleware is recorded by ASP.NET Core instrumentation #3514

@vishweshbankwar

Description

@vishweshbankwar

If the exception thrown during request processing is handled using Exception Handler middleware, the exception is currently recorded by the instrumentation. However, this does not match with the definition of RecordException which calls out Unhandled exceptions specifically. The issue occurs due to the following reason:

The diagnostic source event name that is written in case of handled exception by handler is Microsoft.AspNetCore.Diagnostics.HandledException and in case of unhandled exception is Microsoft.AspNetCore.Diagnostics.UnhandledException. However, due to the pattern matching both handled and unhandled exceptions are recorded.

Related issue #3495.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions