Reputation: 11491
A part of Application insights, is where it shows the 4xx errors and of course it makes sense for example when a page or media has been requested but it doesn't exists. But when it comes to logic of your application, it becomes annoying.
For instance, lets say the one has to validate title of a post to make sure it follows some rules (like not having curse words, not being duplicate, etc.). I will implement this as a service "VerifyTitle" and return corresponding 4xx response with a message to Front-end and they need to just check for 4xx and show the message.
The code is simple and works perfectly fine and the user will see the expected behavior on the page, but in the application insights I have 100 Failures :\
Upvotes: 0
Views: 26
Reputation: 29770
You can't blame Application Insights for not being able to distinguish logical errors build in by the developer from real world (connectivity) issues.
That said, you might be able to exclude them using custom telemetry filters, see the docs. But then you should provide a way to tell the differences. You can use the request path for example to exclude certain endpoint or something else.
Upvotes: 2