Edit

Azure Functions monitoring data reference

This article contains all the monitoring reference information for this service.

See Monitor Azure Functions for details on the data you can collect for Azure Functions and how to use it.

See Monitor executions in Azure Functions for details on using Application Insights to collect and analyze log data from individual functions in your function app.

Metrics

This section lists all the automatically collected platform metrics for this service. These metrics are also part of the global list of all platform metrics supported in Azure Monitor.

For information on metric retention, see Azure Monitor Metrics overview.

Hosting plans that allow your apps to scale dynamically support extra Functions-specific metrics:

These metrics are used to estimate the costs associated with on demand and always ready meters used for billing in a Flex Consumption plan:

Metric Description Meter calculation
On Demand Function Execution Count Total number of function executions in on demand instances. OnDemandFunctionExecutionCount relates to the On Demand Total Executions meter.
Always Ready Function Execution Count Total number of function executions in always ready instances. AlwaysReadyFunctionExecutionCount relates to the Always Ready Total Executions meter.
On Demand Function Execution Units Total MB-milliseconds from on demand instances while actively executing functions. OnDemandFunctionExecutionUnits / 1,024,000 is the On Demand Execution Time meter, in GB-seconds.
Always Ready Function Execution Units Total MB-milliseconds from always ready instances while actively executing functions. AlwaysReadyFunctionExecutionUnits / 1,024,000 is the Always Ready Execution Time meter, in GB-seconds.
Always Ready Units The total MB-milliseconds of always ready instances assigned to the app, whether or not functions are actively executing. AlwaysReadyUnits / 1,024,000 is the Always Ready Baseline meter, in GB-seconds.

In this table, all execution units are calculated by multiplying the fixed instance memory size, such as 512 MB or 2,048 MB, by total execution times, in milliseconds.

These metrics are used to monitor the performance and scaling behavior of your function app in a Flex Consumption plan:

Metric Description
Automatic Scaling Instance Count The number of instances on which this app is running. Note that this is emitted every 30 seconds, and given Flex Consumption scales out and in fast, the number will be an aggregate of all new instances the app used in this time period. Make sure to change the aggregation to the minimum possible in the graph and the aggregation to "count".
Memory working set The current amount of memory used by the app, in MB. Can be further filtered for each instance of the app.
Average memory working set The average amount of memory used by the app, in megabytes (MB). Can be further filtered for each instance of the app.
CPU Percentage The average percentage of CPU being used. Can be further filtered for each instance of the app. This is currently rolling out and might not be available for apps in all regions yet.

These performance metrics help you understand resource utilization and scaling patterns in your Flex Consumption function app. The instance count metric is particularly useful for monitoring the dynamic scaling behavior, while memory and CPU metrics provide insights into resource consumption patterns.

Supported metrics for Microsoft.Web/sites

The following table lists the metrics available for the Microsoft.Web/sites resource type. Most of these metrics apply to both function app and web apps, which both run on App Service.

Note

These metrics aren't available when your function app runs on Linux in a Consumption plan.

  • All columns might not be present in every table.
  • Some columns might be beyond the viewing area of the page. Select Expand table to view all available columns.

Table headings

  • Category - The metrics group or classification.
  • Metric - The metric display name as it appears in the Azure portal.
  • Name in REST API - The metric name as referred to in the REST API.
  • Unit - Unit of measure.
  • Aggregation - The default aggregation type. Valid values: Average (Avg), Minimum (Min), Maximum (Max), Total (Sum), Count.
  • Dimensions - Dimensions available for the metric.
  • Time Grains - Intervals at which the metric is sampled. For example, PT1M indicates that the metric is sampled every minute, PT30M every 30 minutes, PT1H every hour, and so on.
  • DS Export- Whether the metric is exportable to Azure Monitor Logs via diagnostic settings. For information on exporting metrics, see Create diagnostic settings in Azure Monitor.
Metric Name in REST API Advanced platform metrics Unit Aggregation Dimensions Time Grains DS Export
Always Ready Function Execution Count

Always Ready Function Execution Count. For Flex Consumption FunctionApps only.
AlwaysReadyFunctionExecutionCount No Count Total (Sum) Instance PT1M Yes
Always Ready Function Execution Units

Always Ready Function Execution Units. For Flex Consumption FunctionApps only.
AlwaysReadyFunctionExecutionUnits No Count Total (Sum) Instance PT1M Yes
Always Ready Units

Always Ready Units. For Flex Consumption FunctionApps only.
AlwaysReadyUnits No Count Total (Sum) Instance PT1M Yes
Connections

The number of bound sockets existing in the sandbox (w3wp.exe and its child processes). A bound socket is created by calling bind()/connect() APIs and remains until said socket is closed with CloseHandle()/closesocket(). For WebApps and FunctionApps.
AppConnections No Count Average, Count, Maximum, Minimum Instance PT1M Yes
Average memory working set

The average amount of memory used by the app, in megabytes (MiB). For WebApps and FunctionApps.
AverageMemoryWorkingSet No Bytes Average Instance PT1M Yes
Average Response Time (deprecated)

The average time taken for the app to serve requests, in seconds. For WebApps and FunctionApps.
AverageResponseTime No Seconds Average Instance PT1M Yes
Data In

The amount of incoming bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.
BytesReceived No Bytes Total (Sum) Instance PT1M Yes
Data Out

The amount of outgoing bandwidth consumed by the app, in MiB. For WebApps and FunctionApps.
BytesSent No Bytes Total (Sum) Instance PT1M Yes
Percentage CPU

The average percentage of CPU being used. For Flex Consumption function apps only.
CpuPercentage No Percent Average Instance PT1M Yes
CPU Time

The amount of CPU consumed by the app, in seconds. For more information about this metric. Please see https://aka.ms/website-monitor-cpu-time-vs-cpu-percentage (CPU time vs CPU percentage). For WebApps only.
CpuTime No Seconds Count, Total (Sum), Minimum, Maximum Instance PT1M Yes
Current Assemblies

The current number of Assemblies loaded across all AppDomains in this application. For WebApps and FunctionApps.
CurrentAssemblies No Count Average Instance PT1M Yes
File System Usage

Percentage of filesystem quota consumed by the app. For WebApps and FunctionApps.
FileSystemUsage No Bytes Average <none> PT6H, PT12H, P1D Yes
Function Execution Count

Function Execution Count. For FunctionApps only.
FunctionExecutionCount No Count Total (Sum) Instance PT1M Yes
Function Execution Units

Function Execution Units. For FunctionApps only.
FunctionExecutionUnits No Count Total (Sum) Instance PT1M Yes
Gen 0 Garbage Collections

The number of times the generation 0 objects are garbage collected since the start of the app process. Higher generation GCs include all lower generation GCs. For WebApps and FunctionApps.
Gen0Collections No Count Total (Sum) Instance PT1M Yes
Gen 1 Garbage Collections

The number of times the generation 1 objects are garbage collected since the start of the app process. Higher generation GCs include all lower generation GCs. For WebApps and FunctionApps.
Gen1Collections No Count Total (Sum) Instance PT1M Yes
Gen 2 Garbage Collections

The number of times the generation 2 objects are garbage collected since the start of the app process. For WebApps and FunctionApps.
Gen2Collections No Count Total (Sum) Instance PT1M Yes
Handle Count

The total number of handles currently open by the app process. For WebApps and FunctionApps.
Handles No Count Average Instance PT1M Yes
Health check status

Health check status. For WebApps and FunctionApps.
HealthCheckStatus No Count Average Instance PT5M, PT1H, P1D Yes
Http 101

The count of requests resulting in an HTTP status code 101. For WebApps and FunctionApps.
Http101 No Count Total (Sum) Instance PT1M Yes
Http 2xx

The count of requests resulting in an HTTP status code >= 200 but < 300. For WebApps and FunctionApps.
Http2xx No Count Total (Sum) Instance PT1M Yes
Http 3xx

The count of requests resulting in an HTTP status code >= 300 but < 400. For WebApps and FunctionApps.
Http3xx No Count Total (Sum) Instance PT1M Yes
Http 401

The count of requests resulting in HTTP 401 status code. For WebApps and FunctionApps.
Http401 No Count Total (Sum) Instance PT1M Yes
Http 403

The count of requests resulting in HTTP 403 status code. For WebApps and FunctionApps.
Http403 No Count Total (Sum) Instance PT1M Yes
Http 404

The count of requests resulting in HTTP 404 status code. For WebApps and FunctionApps.
Http404 No Count Total (Sum) Instance PT1M Yes
Http 406

The count of requests resulting in HTTP 406 status code. For WebApps and FunctionApps.
Http406 No Count Total (Sum) Instance PT1M Yes
Http 4xx

The count of requests resulting in an HTTP status code >= 400 but < 500. For WebApps and FunctionApps.
Http4xx No Count Total (Sum) Instance PT1M Yes
Http Server Errors

The count of requests resulting in an HTTP status code >= 500 but < 600. For WebApps and FunctionApps.
Http5xx No Count Total (Sum) Instance PT1M Yes
Response Time

The time taken for the app to serve requests, in seconds. For WebApps and FunctionApps.
HttpResponseTime No Seconds Average Instance PT1M Yes
Automatic Scaling Instance Count

The number of instances on which this app is running.
InstanceCount No Count Average <none> PT1M Yes
IO Other Bytes Per Second

The rate at which the app process is issuing bytes to I/O operations that don't involve data, such as control operations. For WebApps and FunctionApps.
IoOtherBytesPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
IO Other Operations Per Second

The rate at which the app process is issuing I/O operations that aren't read or write operations. For WebApps and FunctionApps.
IoOtherOperationsPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
IO Read Bytes Per Second

The rate at which the app process is reading bytes from I/O operations. For WebApps and FunctionApps.
IoReadBytesPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
IO Read Operations Per Second

The rate at which the app process is issuing read I/O operations. For WebApps and FunctionApps.
IoReadOperationsPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
IO Write Bytes Per Second

The rate at which the app process is writing bytes to I/O operations. For WebApps and FunctionApps.
IoWriteBytesPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
IO Write Operations Per Second

The rate at which the app process is issuing write I/O operations. For WebApps and FunctionApps.
IoWriteOperationsPerSecond No BytesPerSecond Total (Sum) Instance PT1M Yes
Memory working set

The current amount of memory used by the app, in MiB. For WebApps and FunctionApps.
MemoryWorkingSet No Bytes Average Instance PT1M Yes
On Demand Function Execution Count

On Demand Function Execution Count. For Flex Consumption FunctionApps only.
OnDemandFunctionExecutionCount No Count Total (Sum) Instance PT1M Yes
On Demand Function Execution Units

On Demand Function Execution Units. For Flex Consumption FunctionApps only.
OnDemandFunctionExecutionUnits No Count Total (Sum) Instance PT1M Yes
Private Bytes

Private Bytes is the current size, in bytes, of memory that the app process has allocated that can't be shared with other processes. For WebApps and FunctionApps.
PrivateBytes No Bytes Average Instance PT1M Yes
Requests

The total number of requests regardless of their resulting HTTP status code. For WebApps and FunctionApps.
Requests No Count Total (Sum) Instance PT1M Yes
Requests In Application Queue

The number of requests in the application request queue. For WebApps and FunctionApps.
RequestsInApplicationQueue No Count Average Instance PT1M Yes
Thread Count

The number of threads currently active in the app process. For WebApps and FunctionApps.
Threads No Count Average Instance PT1M Yes
Total App Domains

The current number of AppDomains loaded in this application. For WebApps and FunctionApps.
TotalAppDomains No Count Average Instance PT1M Yes
Total App Domains Unloaded

The total number of AppDomains unloaded since the start of the application. For WebApps and FunctionApps.
TotalAppDomainsUnloaded No Count Average Instance PT1M Yes
Workflow Action Completed Count

Workflow Action Completed Count. For LogicApps only.
WorkflowActionsCompleted No Count Total (Sum) workflowName, status PT1M Yes
Workflow Actions Failure Rate

Workflow Actions Failure Rate. For LogicApps only.
WorkflowActionsFailureRate No Percent Total (Sum) workflowName PT1M Yes
Logic App Job Pull Rate Per Second

Logic Job Pull Rate per second. For LogicApps only.
WorkflowAppJobPullRate No CountPerSecond Total (Sum) accountName PT1M Yes
Workflow Job Execution Delay

Workflow Job Execution Delay. For LogicApps only.
WorkflowJobExecutionDelay No Seconds Average workflowName PT1M Yes
Workflow Job Execution Duration

Workflow Job Execution Duration. For LogicApps only.
WorkflowJobExecutionDuration No Seconds Average workflowName PT1M Yes
Workflow Runs Completed Count

Workflow Runs Completed Count. For LogicApps only.
WorkflowRunsCompleted No Count Total (Sum) workflowName, status PT1M Yes
Workflow Runs dispatched Count

Workflow Runs Dispatched Count. For LogicApps only.
WorkflowRunsDispatched No Count Total (Sum) workflowName PT1M Yes
Workflow Runs Failure Rate

Workflow Runs Failure Rate. For LogicApps only.
WorkflowRunsFailureRate No Percent Total (Sum) workflowName PT1M Yes
Workflow Runs Started Count

Workflow Runs Started Count. For LogicApps only.
WorkflowRunsStarted No Count Total (Sum) workflowName PT1M Yes
Workflow Triggers Completed Count

Workflow Triggers Completed Count. For LogicApps only.
WorkflowTriggersCompleted No Count Total (Sum) workflowName, status PT1M Yes
Workflow Triggers Failure Rate

Workflow Triggers Failure Rate. For LogicApps only.
WorkflowTriggersFailureRate No Percent Total (Sum) workflowName PT1M Yes

Metric dimensions

For information about what metric dimensions are, see Multi-dimensional metrics.

This service doesn't have any metrics that contain dimensions.

Resource logs

This section lists the types of resource logs you can collect for this service. The section pulls from the list of all resource logs category types supported in Azure Monitor.

Supported resource logs for Microsoft.Web/sites

Category Costs to export Log table Supports basic log plan Supports ingestion-time transformation Example queries
Report Antivirus Audit Logs No AppServiceAntivirusScanAuditLogs

Report on any discovered virus or infected files that have been uploaded to their site.

No Yes
App Service Application Logs No AppServiceAppLogs

Logs generated through your application.

No Yes Queries
Access Audit Logs No AppServiceAuditLogs

Logs generated when publishing users successfully log on via one of the App Service publishing protocols.

No Yes Queries
App Service Authentication logs (preview) Yes AppServiceAuthenticationLogs

Logs generated through App Service Authentication for your application.

No Yes Queries
App Service Console Logs No AppServiceConsoleLogs

Console logs generated from application or container.

No Yes Queries
Site Content Change Audit Logs No AppServiceFileAuditLogs

Logs generated when app service content is modified.

No Yes Queries
HTTP logs No AppServiceHTTPLogs

Incoming HTTP requests on App Service. Use these logs to monitor application health, performance and usage patterns.

No Yes Queries
IPSecurity Audit logs No AppServiceIPSecAuditLogs

Logs generated through your application and pushed to Azure Monitoring.

No Yes
App Service Platform logs No AppServicePlatformLogs

Logs generated through AppService platform for your application.

No Yes
Function Application Logs No FunctionAppLogs

Log generated by Function Apps. It includes logs emitted by the Functions host and logs emitted by customer code. Use these logs to monitor application health, performance, and behavior.

No Yes Queries
Workflow Runtime Logs Yes LogicAppWorkflowRuntime

Logs generated during Logic Apps workflow runtime.

No Yes Queries

The log specific to Azure Functions is FunctionAppLogs.

For more information, see the App Service monitoring data reference.

Azure Monitor Logs tables

This section lists the Azure Monitor Logs tables relevant to this service, which are available for query by Log Analytics using Kusto queries. The tables contain resource log data and possibly more depending on what is collected and routed to them.

App Services

Microsoft.Web/sites

Activity log

The linked table lists the operations that can be recorded in the activity log for this service. These operations are a subset of all the possible resource provider operations in the activity log.

For more information on the schema of activity log entries, see Activity Log schema.

The following table lists operations related to Azure Functions that might be created in the activity log.

Operation Description
Microsoft.web/sites/functions/listkeys/action Return the keys for the function.
Microsoft.Web/sites/host/listkeys/action Return the host keys for the function app.
Microsoft.Web/sites/host/sync/action Sync triggers operation.
Microsoft.Web/sites/start/action Function app started.
Microsoft.Web/sites/stop/action Function app stopped.
Microsoft.Web/sites/write Change a function app setting, such as runtime version or enable remote debugging.

You may also find logged operations that relate to the underlying App Service behaviors. For a more complete list, see Microsoft.Web resource provider operations.