Function Compute seamlessly integrates with Application Real-Time Monitoring Service (ARMS). You can
use the application performance management (APM) feature of ARMS by configuring environment
variables. ARMS provides non-intrusive advanced monitoring without code changes for
applications in the Java 8 runtime environment. This way, you can view various metrics
of instances, such as the total number of requests, the response time, and errors.
This topic describes how to connect a function to ARMS.
Background information
Function Compute seamlessly integrates with ARMS. You can use ARMS to monitor and trace functions
to obtain relevant information, such as metrics of instances, tracing data, Java Virtual
Machine (JVM) metrics, and code-level profiling information.
Information |
Description |
Metrics of instances |
You can view various host metrics for instances, such as metrics that are related
to the CPU, the memory, and requests.
|
Tracing data |
The ARMS agent automatically obtains the topological relationships between a function
and its upstream and downstream components and related metrics. You can view the information
about the components such as databases and message queues in the ARMS console.
|
JVM metrics |
The ARMS agent automatically obtains JVM applications. You can view the monitoring
information of the JVM applications in the ARMS console, such as the number of garbage
collections (GCs), heap information, and thread stack information.
|
Code-level profiling information |
You can view code-level profiling information of function execution, such as the amount
of time consumed by each method and errors.
|
Procedure
- Log on to the Function Compute console.
- In the left-side navigation pane, click Services and Functions.
- In the top navigation bar, select a region.
Notice If you need to view monitoring information after your function is connected to ARMS,
make sure that ARMS resides in the same region as your function.
- On the Services page, click the name of the specified service.
- On the Functions page, find the function that you want to manage. Click Configure in the Actions column.
- In the Environment Variables section of the Modify Function Settings page, select a method for configuring environment
variables as needed.
- Form Editor (default method)
- Click Add Variable.
- Configure the key-value pair of the environment variable.
- JSON Editor
- Click JSON Editor.
- In the code editor, enter a key-value pair in the JSON format. The following code
shows a sample key-value pair:
{
"FC_EXTENSIONS_ARMS_LICENSE_KEY":"iioe7jcnuk@a0bcdaec24f****"
}
Settings of the key-value pair:
- Click Save.
After the environment variable is configured, the function is added to application
monitoring of ARMS for high-performance management. You are charged for the services
provided by ARMS.
For more information, see Billing.
References
If the runtime environment of the function that you connect to ARMS is not Java 8,
you can refer to related ARMS topics to modify related information. For more information,
see Overview.
Result
After you connect the function to ARMS, you can view the monitoring information of
the function in the ARMS console.
Log on to the
ARMS console. Choose . Then, click the name of the application that you require to view detailed monitoring
information. For more information, see
Application overview.
Note The application name is in the format of FC:{serviceName}/{functionName}, such as FC:Service/Function.