Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Yes. App Service platform metrics, including CPU-related metrics, can be routed into Azure Monitor Logs / Log Analytics.
From the monitoring reference:
- App Service metrics are exposed under the
Microsoft.Web/sitesandMicrosoft.Web/serverfarmsmetric namespaces. - Platform metrics can be sent to Azure Monitor Logs via a diagnostic setting, where they land in the
AzureMetricstable.
Concretely for the worker CPU metric:
- Log table name
- When a diagnostic setting is configured to send metrics to Logs, App Service metrics are stored in the
AzureMetricstable.
- When a diagnostic setting is configured to send metrics to Logs, App Service metrics are stored in the
- Metric name / field for CPU usage
- CPU-related metrics for App Service are part of the Microsoft.Web metrics set. The full list (including CPU Percentage and CPU Time) is documented under the supported metrics for
Microsoft.Web/sitesandMicrosoft.Web/serverfarmsin the monitoring data reference. - In the
AzureMetricstable, the metric is identified by theMetricNamecolumn; CPU metrics appear there with their documented metric names (for example, CPU Time or CPU Percentage as listed in theMicrosoft.Web/sitesmetrics reference). The actual numeric value is stored in the standard value columns ofAzureMetrics(such asAverage,Minimum,Maximum, etc., depending on the aggregation chosen when the metric was emitted).
- CPU-related metrics for App Service are part of the Microsoft.Web metrics set. The full list (including CPU Percentage and CPU Time) is documented under the supported metrics for
- Per worker instance vs. plan level
- App Service metrics support dimensions. For
Microsoft.Web/sitesandMicrosoft.Web/serverFarms, the documented metric dimension isInstance. - When metrics are sent to Logs, this dimension is preserved in the
AzureMetricstable, so CPU metrics can be queried per worker instance by filtering or grouping on theInstancedimension, or aggregated at the App Service Plan level by omitting that dimension.
- App Service metrics support dimensions. For
To summarize: the worker CPU metric visible in the Metrics blade can be exported to Azure Monitor Logs via diagnostic settings, where it appears in the AzureMetrics table, identified by its MetricName and with an Instance dimension that allows per-worker-instance analysis as well as plan-level aggregation.
References: