Skip to content

Huawei Cloud FunctionGraph

The displayed Metrics of Huawei Cloud FunctionGraph include invocation counts, error counts, rejected counts, concurrency, reserved instance counts, and running time (including maximum running time, minimum running time, and average running time), which reflect the operation status of the FunctionGraph function.

Configuration

Install Func

It is recommended to enable Guance Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed, please proceed with the script installation.

For self-deployment of Func, refer to Self-deployment Func

Install Script

Note: Please prepare the required Huawei Cloud AK in advance (for simplicity, you can directly grant global read-only permission ReadOnlyAccess).

  1. Log in to the Func console, click on 【Script Market】, enter the Guance script market, and search for ID: 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 a Startup script set and configure the corresponding startup scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute it once 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 automatic trigger configuration, and check the corresponding task records and logs for any anomalies.
  2. In Guance, check if asset information exists in 「Infrastructure / Custom」.
  3. In Guance, check if there are corresponding monitoring data in 「Metrics」.

Metrics

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

Metric ID Metric Name Metric Description Value Range Measurement Object Monitoring Period (Original Metric)
count Invocation Count This Metric is used to count the number of function invocations. Unit: counts ≥ 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 error counts: function request exceptions, causing the execution to fail and return 200. Function syntax errors or execution errors. Unit: counts ≥ 0 counts Function 1 minute
rejectcount Rejected Count This Metric is used to count the number of function invocations that were rejected. Rejected counts refer to the number of requests that were rejected due to too many concurrent requests and system flow control. Unit: counts ≥ 0 counts Function 1 minute
concurrency Concurrency This Metric is used to count the maximum number of concurrent requests processed by the function. Unit: counts ≥ 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: counts ≥ 0 counts Function 1 minute
duration Average Running Time This Metric is used to count the average running time of function invocations. Unit: milliseconds ≥ 0 ms Function 1 minute
maxDuration Maximum Running Time This Metric is used to count the maximum running time of function invocations. Unit: milliseconds ≥ 0 ms Function 1 minute
minDuration Minimum Running Time This Metric is used to count the minimum running time of function invocations. Unit: milliseconds ≥ 0 ms Function 1 minute

Object

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, fields may change with subsequent updates.

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

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

Feedback

Is this page helpful? ×