Azure Functions monitoring data reference

This reference applies to the use of Azure Monitor for monitoring function apps hosted in Azure Functions. See Monitoring function app with Azure Monitor for details on using Azure Monitor to collect and analyze monitoring data from your function apps.

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.

Azure Functions specific metrics

There are two metrics that are of specific interest to function apps:

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.

Table headings

  • Metric - The metric display name as it appears in the Azure portal.
  • Name in Rest API - Metric name as referred to in the REST API.
  • Unit - Unit of measure.
  • Aggregation - The default aggregation type. Valid values: Average, Minimum, Maximum, Total, 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 dimensions

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

Azure Functions 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

The log specific to Azure Functions is FunctionAppLogs.

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

Azure Monitor Logs tables

This section refers to all of the Azure Monitor Logs tables relevant to this service, which are available for query by Log Analytics using Kusto queries.

This service uses the listed tables to store resource log data. The following columns are relevant.

App Services

Microsoft.Web/sites

Activity log

The linked table lists the operations that may be recorded in the activity log for this service. This is 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.