Process of Using FunctionGraph
FunctionGraph allows you to run your code without provisioning or managing servers, while ensuring high availability and scalability. All you need to do is upload your code and set execution conditions, and FunctionGraph will take care of the rest. You only pay for what you use and you are not charged when your code is not running.
To quickly create a function using FunctionGraph, do as follows:
- Create a user and grant FunctionGraph permissions: Ensure that the login user has the FunctionGraph Administrator permission.
- Create a function: Create a function from scratch, using a template, by running Terraform commands, or with a container image.
- Configure the function: Configure function code, dependencies, public network or VPC access, agency permissions, and triggers, and perform online debugging.
- Invoke the function: Functions can be triggered through RESTful APIs or cloud service event sources.
- Flow: Create and manage function flows.
Process
The following shows the details:
- Write code.
Write code in Node.js, Python, Java, C#, PHP, Go, Cangjie, or custom runtimes. For details, see FunctionGraph Developer Guide.
- Upload code.
Upload the code. You can edit code directly online or upload a ready-to-use code file. For details, see Configuring Function Code and Configuring Dependencies.
- Trigger functions by API calls or cloud service events.
Functions are triggered by API calls or cloud service events. For details, see Configuring Triggers.
- Implement auto scaling.
FunctionGraph scales automatically during function execution based on the number of requests, with no configuration required. For details about concurrency restrictions, see Notes and Constraints.
- View logs.
FunctionGraph integrates with Log Tank Service (LTS), allowing you to view function execution logs. For details, see Configuring and Viewing Function Invocation Logs.
- View monitoring information.
View graphical monitoring information through Cloud Eye that is interconnected with FunctionGraph. For details, see FunctionGraph Metrics.
- Check your bills.
After execution is complete, you will be billed based on the number of function execution requests and the execution duration. For details, see Bills.
Introduction to Dashboard
- View your created functions/function quota, used storage/storage quota, and monthly invocations and resource usage. Figure 3 Monthly statistics
- View tenant-level metrics, including invocations, top 10 functions by invocation, errors, top 10 functions by error, duration, and throttles.
Table 1 describes the function metrics.
Table 1 Function metrics Metric
Unit
Description
Invocations
Count
Total number of invocation requests, including invocation errors and throttled invocations. In case of asynchronous invocation, the count starts only when a function is executed in response to a request.
The 10 Functions with the Most Invocations
-
Top 10 functions by invocation in the last day, last 3 days, or a custom period.
Duration
ms
Maximum duration: the maximum duration all functions are executed at a time within a period.
Minimum duration: the minimum duration all functions are executed at a time within a period.
Average duration: the average duration all functions are executed at a time within a period.
Errors
Count
Number of times that your functions failed with error code 200 being returned. Failures caused by syntax or execution errors are also counted.
The 10 Functions with the Most Errors
-
Top 10 functions by error in the last day, last 3 days, or a custom period.
Throttles
Count
Number of times that FunctionGraph throttled your function execution requests due to the resource limit.
- View flow metrics, including the number of invocations, duration, number of errors, and number of running workflows.
Metric
Unit
Description
Invocations
Count
Total number of invocation requests, including successful, failed, and ongoing requests. In case of asynchronous invocation, the count starts only when a flow executes in response to a request.
Duration
ms
Average time taken to execute a flow in a specified period.
Errors
Count
Number of times that flows failed to be executed.
Running Workflows
Count
Number of ongoing flow executions.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
