Skip to content

Huawei Cloud FunctionGraph

The displayed metrics of Huawei Cloud FunctionGraph include the number of invocations, error counts, rejected counts, concurrency, reserved instance count, and running time (including maximum, minimum, and average running time), etc. These metrics reflect the operational status of the FunctionGraph function.

Configuration

Install Func

It is recommended to activate Guance integration - extension - DataFlux Func (Automata): all prerequisites are automatically installed, please proceed with the script installation.

If you want to deploy Func manually, refer to Manual Deployment of Func

Install Script

Note: Please prepare the Huawei Cloud AK that meets the requirements in advance (for simplicity, you can directly grant the global read-only permission Tenant Guest).

Automata Activation Script

  1. Log in to the Guance console.
  2. Click the [Integration] menu, and select [Cloud Account Management].
  3. Click [Add Cloud Account], select [Huawei Cloud], and fill in the required information on the interface. If you have already configured the cloud account information before, you can skip this step.
  4. Click [Test], and after the test is successful, click [Save]. If the test fails, please check if the relevant configuration information is correct and retest.
  5. Click [Cloud Account Management] in the list to see the added cloud account, click the corresponding cloud account to enter the details page.
  6. Click the [Integration] button on the cloud account details page, find Huawei Cloud FunctionGraph under the Not Installed list, and click the [Install] button. The installation interface will pop up for installation.

Manual Activation Script

  1. Log in to the Func console, click [Script Market], enter the Guance script market, and search for integration_huaweicloud_functiongraph.

  2. Click [Install], then enter the corresponding parameters: Huawei Cloud AK, SK, and account name.

  3. Click [Deploy Startup Script], the system will automatically create the Startup script set and automatically configure the corresponding startup script.

  4. After activation, you can see the corresponding automatic trigger configuration in [Manage / Automatic Trigger Configuration]. Click [Execute] to execute it immediately without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.

Verification

  1. In [Manage / Automatic Trigger Configuration], confirm whether the corresponding task has the corresponding automatic trigger configuration, and you can also check the corresponding task records and logs to see if there are any exceptions.
  2. In Guance, check if there is asset information in [Infrastructure / Custom].
  3. In Guance, check if there is corresponding monitoring data in [Metrics].

Metrics

After configuring HUAWEI SYS.FunctionGraph, the default measurement is as follows. You can collect more metrics by configuration. Huawei Cloud Monitoring Metrics Details

Metric ID Metric Name Metric Description Value Range Measurement Object Monitoring Period (Raw Metric)
count Invocation Count This metric is used to count the number of function invocations. Unit: count ≥ 0 counts Function 1 minute
failcount Error Count This metric is used to count the number of function invocation errors. The following two situations will be counted as errors: function request exception, resulting in failure to complete execution and return 200. Function syntax error or execution error. Unit: count ≥ 0 counts Function 1 minute
rejectcount Rejected Count This metric is used to count the number of function invocation rejections. Rejected count refers to the number of requests rejected due to too many concurrent requests and system flow control. Unit: count ≥ 0 counts Function 1 minute
concurrency Concurrency This metric is used to count the maximum number of concurrent requests processed by the function. Unit: count ≥ 0 counts Function 1 minute
reservedinstancenum Reserved Instance Count This metric is used to count the number of reserved instances configured for the function. Unit: count ≥ 0 counts Function 1 minute
duration Average Running Time This metric is used to count the average running time of function invocations. Unit: millisecond ≥ 0 ms Function 1 minute
maxDuration Maximum Running Time This metric is used to count the maximum running time of function invocations. Unit: millisecond ≥ 0 ms Function 1 minute
minDuration Minimum Running Time This metric is used to count the minimum running time of function invocations. Unit: millisecond ≥ 0 ms Function 1 minute

Objects

The collected HUAWEI SYS.FunctionGraph object data structure can be seen in [Infrastructure - Custom].

{
  "measurement": "huaweicloud_functiongraph",
  "tags": {
    "code_type"    : "inline",
    "domain_id"    : "1e1fed98168XXXXXX0e285140c83",
    "func_name"    : "XXXXX",
    "func_urn"     : "urn:fss:cn-north-4:c631f046252d4ebda45f253c62d48585:function:default:Helloworld2",
    "handler"      : "index.handler",
    "image_name"   : "latest-230718XXXXX@fikfe",
    "namespace"    : "c631f04625XXXXXX45f253c62d48585",
    "package"      : "default",
    "project_name" : "cn-north-4",
    "runtime"      : "Python3.9"
  },
  "fields": {
    "code_size"       : 286,
    "cpu"             : 300,
    "last_modified"   : "2023-07-18TXX:XX:XX+08:00",
    "memory_size"     : 128,
    "timeout"         : 3,
    "strategy_config" : "{Function Strategy Configuration}",
    "message"         : "{Instance JSON Data}"
  }
}

Note: The fields in tags and fields may change with subsequent updates.

Tip 1: The value of tags.name is the instance ID, which is used as a unique identifier.

Tip 2: fields.last_modified, fields.message, and fields.strategy_config are all JSON serialized strings.

Feedback

Is this page helpful? ×