You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runtime version (e.g. net461, net48, netcoreapp2.1, netcoreapp3.1, etc. You can find this information from the *.csproj file):
net8.0
Hosting environment (e.g. Azure Web App, App Service on Linux, Windows, Ubuntu, etc.):
Azure Web Apps
Describe the bug
Follow up to #2645. Similar use case, but more scoped (as there's no relation to ILogger)
Leveraging builder.Services.AddApplicationInsightsTelemetry(...), IExceptionHandler interceptors and app.UseExceptionHandler(builder => { });
doesn't seem to play well together.
Indeed, although some Exceptions are handled in the IExceptionHandler implementations (by returning having the TryHandleAsync method return true), those are still tracked in ApplicationInsights.
Which leads to some pollution with a lot of unwanted Exceptions being tracked.
Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0"
*.csproj
file):net8.0
Azure Web Apps
Describe the bug
Follow up to #2645. Similar use case, but more scoped (as there's no relation to
ILogger
)Leveraging
builder.Services.AddApplicationInsightsTelemetry(...)
,IExceptionHandler
interceptors andapp.UseExceptionHandler(builder => { });
doesn't seem to play well together.
Indeed, although some Exceptions are handled in the
IExceptionHandler
implementations (by returning having theTryHandleAsync
method returntrue)
, those are still tracked in ApplicationInsights.Which leads to some pollution with a lot of unwanted Exceptions being tracked.
ApplicationInsights-dotnet/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/DiagnosticListeners/Implementation/HostingDiagnosticListener.cs
Lines 410 to 418 in e34286b
Would there be a way to opt out of this automatic tracking?
To Reproduce
If the above information is not enough, would this need to a end to end repro case, please let me know and I'll take the time to craft one.
The text was updated successfully, but these errors were encountered: