-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application Insights logs handled exceptions (using Polly) #2612
Comments
Any news on that? |
I have also just hit this issue and am wondering why it's happening |
I'm having the same problem, the Polly is handling the exception but the exception is still being logged in Application Insights, any ideas on how to solve this? |
I'm running into the same thing. There is apparently a way to filter out what gets written to app insights; you can write a custom TelemetryProcessor which can check the type of exception before deciding to proceed with logging it or not, but that's not ideal. I don't want to filter on specific types; I want to filter on whether I'm already handling it with Polly. E.g. if I'm handling Has anyone come across a better solution? Ultimately I think Polly will need updating. |
Morning. Cheers. |
We thought we had the same issue, but the exceptions that triggers a retry is logged with a severity level of 2, so can be filtered out on that. |
Repro steps
The problem occurs while using Polly library, when using
Policy.Handle<HttpRequestException>().RetryAsync()
(inside Azure Function). When the exception happens it is logged by application insights although in my opinion it should be regarded as handledExpected behavior
No exception should be logged
Actual behavior
Exception is logged and is visible request timeline in application insights
Related information
Any thoughts would be much appreciated
The text was updated successfully, but these errors were encountered: