Azure App Service Monitoring
Microsoft provides different features to monitor our App service.
Application hosted in App Service is subject to certain limits on the resources they can use. The boundaries are defined by the App Service plan associated with the app. When we create an app service plan, we generally select a pricing tier and also size. Based on the size and pricing tier, we'll be allocated with a certain amount of CPU and a certain amount of memory. Quotas for Free or Shared apps are as follows.
The only quota applicable to apps hosted on Basic, Standard, and Premium plans is Filesystem, based on the number of App service plans that we have created in our subscription.
Metrics provide information about the app or App Service plan's behaviour. So Metrics are provided at two levels.
Granularity and retention
However, if we use the application insights, then this retention will increase drastically.
App service web apps provide diagnostic functionality for logging information from both the web server and the web application. These are logically separated into web server diagnostics and application diagnostics.
Web server Diagnostics: In this, we can have a detailed error logging, which is any Http 400, and the above error will get logged. We can also view the logs. And the second thing is failed request tracking, which basically contains the trace of IIS components that are used to process our request. And the third one is web server logging. These are the overall metrics on how many Http requests we received, and from a particular IP address.
Application Diagnostics: It allows us to capture the information produced by the web application. So if we're using system diagnostic trace, all the information will be provided by application diagnostics.
Diagnostic information can be stored in file system or Azure storage.
During the development of an application, it is often useful to see logging information in near-real-time. We can steam logging information to our development environment using either Azure PowerShell or the azure Command-line interface.
These are the basic commands that we need to use to stream the log files.