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

Overview

Enable Insights when you create a service

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. Click Create Service in the upper-right corner of the Services pane.
    creat_service
  4. On the Create Service page, enter a service name in the Service Name field, select Enable Request-level Metrics, and then click Submit.
    Note If you select Enable Request-level Metrics, Insights is enabled for all functions in the service.

Enable Insights for a created service

You can perform the following steps to enable Insights for a created service:

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions. In the Services pane, click the service that you require.
  4. On the Services and Functions page, click the service that you require. Then, click the Service Configurations tab. On the Service Configurations tab, click Modify Configuration.
    Modify service configurations
  5. In the Log Config section on the Configure Service page, turn on Enable Request-level Metrics and click Submit.

View the invocation metrics for a function

After you enable Insights for your service, Function Compute automatically records the invocation metrics for all functions in the service. You can perform the following steps to view the invocation metrics for a function:

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. On the Functions tab, click the name of the function that you require.
  4. On the details page of the function, click the Logs tab. On the Logs tab, set the query parameters to view the invocation metrics for the function.