

# Managed Instances Lambda Functions
<a name="Lambda-Insights-metrics-managed-instances"></a>

The following metrics are available as time series aggregated data in CloudWatch Metrics in the `LambdaInsights` namespace for Lambda functions running on Managed Instances.


| Metric name | Dimensions | Description | 
| --- | --- | --- | 
|  `cpu_utilization` |  function\$1name function\$1name, version  |  The average CPU measured as a percentage of the vCPUs allocated to the execution environment. Unit: Percent  | 
|  `cpu_utilization_max` |  function\$1name function\$1name, version  |  The maximum CPU measured as a percentage of the vCPUs allocated to the execution environment. This is sampled at 1 second intervals. Unit: Percent  | 
|  `cpu_total_time` |  function\$1name function\$1name, version  |  Sum of `cpu_system_time` and `cpu_user_time`. Unit: Milliseconds  | 
|  `memory_utilization` |  function\$1name function\$1name, version  |  The average memory measured as a percentage of the memory allocated to the execution environment. Unit: Percent  | 
|  `memory_utilization_max` |  function\$1name function\$1name, version  |  The maximum memory measured as a percentage of the memory allocated to the execution environment. This is sampled at 50ms intervals. Unit: Percent  | 
|  `used_memory_max` |  function\$1name function\$1name, version  |  The measured memory of the function's execution environment. Unit: Megabytes  | 
|  `rx_bytes` |  function\$1name function\$1name, version  |  The number of bytes received by the function. Unit: Bytes  | 
|  `tmp_free` |  function\$1name function\$1name, version  |  The amount of space available in the `/tmp` directory. Unit: Bytes  | 
|  `tmp_used` |  function\$1name function\$1name, version  |  The amount of space used in the `/tmp` directory. Unit: Bytes  | 
|  `tx_bytes` |  function\$1name function\$1name, version  |  The number of bytes sent by the function. Unit: Bytes  | 
|  `total_memory` |  function\$1name function\$1name, version  |  The amount of memory allocated to your Lambda function. This is the same as your function's memory size. Unit: Megabytes  | 
|  `total_network` |  function\$1name function\$1name, version  |  Sum of `rx_bytes` and `tx_bytes`. Even for functions that don't perform I/O tasks, this value is usually greater than zero because of network calls made by the Lambda runtime. Unit: Bytes  | 
|  `used_memory_max` |  function\$1name function\$1name, version  |  The measured memory of the function sandbox. Unit: Megabytes  | 

The following metrics can be found in the embedded metric format log entries by using CloudWatch Logs Insights. For more information about CloudWatch Logs Insights, see [ Analyzing Log Data with CloudWatch Logs Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html).

For more information about embedded metric format, see [Embedding metrics within logs](CloudWatch_Embedded_Metric_Format.md).


| Metric name | Description | 
| --- | --- | 
|  `lambda_mode` |  Indicating if this log event is for a function running on Lambda managed instances or not. If this field is present in the log event, it can have only one value - `managed-instance`. The absence of this field indicates that the function was a regular Lambda function. Unit: String  | 
|  `agent_version` |  The current version of the Lambda Insights extension agent running on the Lambda function. Unit: String  | 
|  `cpu_utilization` |  The average CPU measured as a percentage of the vCPUs allocated to the execution environment. Unit: Percent  | 
|  `cpu_utilization_max` |  The maximum CPU measured as a percentage of the vCPUs allocated to the execution environment. This is sampled at 1 second intervals. Unit: Percent  | 
|  `cpu_user_time` |  The amount of time the CPU spent executing user code. Unit: Milliseconds  | 
|  `cpu_system_time` |  The amount of time the CPU spent executing kernel code. Unit: Milliseconds  | 
|  `cpu_total_time` |  Sum of `cpu_system_time` and `cpu_user_time`. Unit: Milliseconds  | 
|  `fd_use` |  File descriptors currently in use. Unit: Count  | 
|  `fd_max` |  Maximum file descriptors available for use. Unit: Count  | 
|  `execution_environment_init` |  Boolean value indicating if a new execution environment was spun up for this function. Unit: Boolean  | 
|  `version` |  The Lambda function's version for which the other metrics were collected. Unit: Count  | 
|  `agent_memory_max` |  Maximum memory consumed by the Lambda Insights extension agent. Unit: Bytes  | 
|  `agent_memory_avg` |  Average memory consumed by the Lambda Insights extension agent. Unit: Bytes  | 
|  `memory_utilization` |  The average memory measured as a percentage of the memory allocated to the execution environment. Unit: Percent  | 
|  `memory_utilization_max` |  The maximum memory measured as a percentage of the memory allocated to the execution environment. This is sampled at 50ms intervals. Unit: Percent  | 
|  `used_memory_max` |  The measured memory of the function's execution environment. Unit: Megabytes  | 
|  `rx_bytes` |  The number of bytes received by the function. Unit: Bytes  | 
|  `tx_bytes` |  The number of bytes sent by the function. Unit: Bytes  | 
|  `threads_max` |  The number of threads in use by the function process. As a function author, you don't control the initial number of threads created by the runtime. Unit: Count  | 
|  `tmp_free` |  The amount of space available in the `/tmp` directory. Unit: Bytes  | 
|  `tmp_used` |  The amount of space used in the `/tmp` directory. Unit: Bytes  | 
|  `tmp_max` |  The amount of space available in the `/tmp` directory. Unit: Bytes  | 
|  `total_memory` |  The amount of memory allocated to your Lambda function. This is the same as your function's memory size. Unit: Megabytes  | 
|  `total_network` |  Sum of `rx_bytes` and `tx_bytes`. Even for functions that don't perform I/O tasks, this value is usually greater than zero because of network calls made by the Lambda runtime. Unit: Bytes  | 