Help Center/ Config/ User Guide/ Resource Compliance/ Built-In Policies/ FunctionGraph/ FunctionGraph Functions Have Log Collection Enabled
Updated on 2025-08-25 GMT+08:00

FunctionGraph Functions Have Log Collection Enabled

Rule Details

Table 1 Rule details

Parameter

Description

Rule Name

function-graph-logging-enabled

Identifier

FunctionGraph Functions Have Log Collection Enabled

Description

If a function does not have log collection enabled, this function is non-compliant.

Tag

fgs

Trigger Type

Configuration change

Filter Type

fgs.functions

Rule Parameters

None

Application Scenarios

You can enable LTS to better manage FunctionGraph function logs. After you enable LTS, FunctionGraph automatically creates a log group starting with functiongraph. When you create a function, a log stream starting with the function name is generated. For details, see Managing Function Logs. The benefits are as follows:

  • Quick troubleshooting and debugging: LTS automatically captures function execution logs including request parameters, return values, and error stacks to help developers quickly locate code logic errors or runtime exceptions.
  • Status monitoring: LTS logs can be analyzed to collect statistics on key metrics, such as the number of function calls, execution duration, error rate, and memory usage.
  • Data integrity: Logs can be transferred to prevent log tampering or loss.

Solution

Configure log groups and streams and view function logs. For details, see Managing Function Logs.

Rule Logic

  • If log collection is disabled for a function, this function is non-compliant.
  • If log collection is enabled for a function, and a log group and log stream are configured, this function is compliant.