Skip to content

Commit 85ba430

Browse files
Update release-notes/10.0/preview/preview7/aspnetcore.md
Co-authored-by: Martin Costello <[email protected]>
1 parent 419e080 commit 85ba430

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

release-notes/10.0/preview/preview7/aspnetcore.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ ASP.NET Core updates in .NET 10:
1717

1818
## Configure suppressing exception handler diagnostics
1919

20-
This setting is useful when you know an exception is transient, or has been handled by the exception handler middleware, and don't want to error logs written to your observability platform.
20+
A new configuration option has been added to the [ASP.NET Core exception handler middleware](https://learn.microsoft.com/aspnet/core/fundamentals/error-handling#exception-handler-page) to control diagnostic output: `ExceptionHandlerOptions.SuppressDiagnosticsCallback`. This callback is passed context about the request and exception, allowing you to add logic that determines whether the middleware should write exception logs and other telemetry.
21+
22+
This setting is useful when you know an exception is transient, or has been handled by the exception handler middleware, and don't want the error logs written to your observability platform.
2123

2224
Additionally, the middleware's default behavior has changed: it no longer writes exception diagnostics for exceptions handled by `IExceptionHandler`. Based on user feedback, logging handled exceptions at the error level was often undesirable when `IExceptionHandler.TryHandleAsync` returned `true`.
2325

0 commit comments

Comments
 (0)