Hello S.M. Sadiq-Ur-Rahman Shifath,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to know how you can Best recommended approach to handle 404 errors to /admin/host/ping for my asp.net MVC application hosted in Azure app services.
The methods many uses that can cause an issue or overhead later are:
- Disabling Availability Monitoring, which could lead to missed health issues if Azure can't perform its checks.
- Custom Middleware which could introduces maintenance overhead and potential edge-case errors.
- Ignoring Specific Paths, which could mask genuine issues if
/admin/host/ping
starts serving unexpected errors. - Then, Sampling Adjustment which reduces overall log visibility, which might impact monitoring of other areas.
The best practices solution is by focusing on filtering logs and leveraging Application Insights features, you can maintain both robust health monitoring and clean log data. The links provides more detailed steps to achieve this:
- Filter
/admin/host/ping
Logs in Application Insights. - https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#add-telemetry-processors - Enable Adaptive Sampling in Application Insights. - https://learn.microsoft.com/en-us/azure/azure-monitor/app/sampling
- Avoid Disabling Health Checks. - https://learn.microsoft.com/en-us/azure/app-service/manage-automatic-scaling?tabs=azure-portal#why-does-appservicehttplogs-have-log-entries-similar-to-adminhostping-with-a-404-status
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.