This topic shows you how to enable Insights for a service and view the invocation metrics for a function in the Function Compute console.
Background information
Request-level metric logsBefore you begin
- Function Compute
- Log Service
Enable Insights for a service
Log on to the Function Compute console. In the left-side navigation pane, click Services & Functions.
In the top navigation bar, select a region. On the Services page, find the desired service and click Configure in the Actions column.
- In the Log Settings section of the Modify Service page, configure the parameters based on your business requirements and click Save. The following table describes the parameters that you must configure. Retain the default values for other parameters.
Parameter Definition Example Logging Specifies whether to store function invocation logs in Log Service. For more information about the logging feature, see Configure logging. Enable Log Service Project Select a log project that you configured. aliyun-fc-hangzhou-2238f0df-a742-524f-9f90-976ba******* Logstore Select a Logstore that you configured. function-log Request-level Metrics Specifies whether to use the Insights feature to view the request-level metrics. After you enable this feature, invocation metrics for functions in the service are collected and delivered to the specified Logstore. Enable After the Insights feature is configured, you can find the corresponding request line on the Call Request List tab under Logs, and then click the request ID to view the invocation information including the amount of time and memory consumed by the invocation, and invocation method.