Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ FunctionGraph/ User Guide/ Monitoring/ Logs/ Managing Function Logs

Managing Function Logs

Updated on 2024-11-12 GMT+08:00
NOTICE:

FunctionGraph v1 supports log management by using AOM or LTS.

FunctionGraph v2 supports log management by using LTS only.

  • Using AOM to manage function logs

  • Using LTS to manage function logs
    Figure 1 Logs page

Using AOM to Manage Function Logs

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of the desired function.
  3. Choose Monitoring > Logs. On the displayed page, enter search criteria.

    NOTE:
    • You can:

      1. Enter a keyword for exact search. A keyword is a word between two adjacent delimiters.

      2. Enter a keyword with wildcards for fuzzy match. Example: *ROR*, ERR*, or ER*OR.

      3. Enter a phrase for exact search. Example: Start to refresh alm Statistic.

      4. Use AND (&&) or OR (||) to combine keywords to search. Example: query&&logs or query||logs.

    • You can select Last 30 minutes, Last hour, Last day, and Custom (up to one month, for example, 2022/04/01 16:34:48–2022/05/01 16:34:48).
    • You can query logs by version.

  4. Click to search for logs.

    Figure 2 Querying logs
    NOTE:

    The log query result contains time, request ID, invocation result, duration, memory, and version.

  5. Perform the following operations if needed:

    1. Search for logs by keyword.

    2. Filter logs by status: Error, Info, Error & Warning, and Error & Warning & Info.

    3. View logs in full screen.

    4. Download logs.

    Figure 3 Other operations

Using LTS to Manage Function Logs

You can enable LTS to better manage 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.

You can also bind a log group and log stream to a function to store its invocation logs. For details, see Configuring a Log Group and Log Stream.

NOTE:
  • By default, 20 log streams are created, which cannot be customized. On the Logs tab page of the function, press F12 to find out the log stream ID of the query API, and then locate the corresponding log stream ID in LTS.

  • Deleting a function log group by mistake on the LTS console will not be detected by FunctionGraph, and the historical log data can no longer be retrieved. To use a log group, modify the function description and save the changes. A new log group will be created.
  1. Enable LTS.

    Enabling LTS in FunctionGraph v1: On the Logs tab page, click Enable LTS to Manage Function Logs.

    NOTE:

    In FunctionGraph v1, you can switch back to AOM. In that case, AOM will take over LTS to manage function logs. You will be billed for logs generated on a pay-per-use basis.

    Enabling LTS in FunctionGraph v2: On the Logs tab page, click Enable LTS. Click OK. LTS is enabled successfully.

    NOTE:

    In FunctionGraph v2, only LTS can be used to manage function logs.

  2. Set filter criteria.

    • Request List: Filter requests by request ID, result (success or failure), or cause (initialization failed, load failed, system error, timed out, out of memory, out of disk space, or code error).
    • Request Log: Filter logs by keyword, request ID, or instance ID.
    Table 1 Invocation result

    Result

    Description

    Execution successful

    Log printed when a function is successfully executed.

    Execution failed

    Log printed when a function fails to be executed due to invocation timeout, memory or disk threshold exceeded, or code errors.

    To view the logs about invocation timeout, select Invocation timed out from the drop-down list. The methods for viewing the other three types of logs are the same.

    Table 2 Cause analysis

    Cause

    Description

    Initialization failed

    Log printed when the function initialization fails.

    Load failed

    Log generated when the runtime fails to load your function file.

    System error

    Internal error.

    Invocation timed out

    Log printed when the function invocation period is longer than the preset limit.

    Memory threshold exceeded

    Log printed when the function memory size exceeds the preset limit.

    Disk threshold exceeded

    Log printed when the disk size exceeds the preset limit.

    Code error

    Log printed when a code error occurs.

    NOTE:
    • You can view logs of the last hour, last day, last 3 days, or a custom time period.
    • To manage function logs, go to the LTS console.
    • Max. 10 MB logs can be retained for common instances during initialization. When this limit is reached, the latest logs replace the old ones.

Downloading Logs

NOTICE:
  • Currently, logs can be downloaded only when you use AOM for log management.
  • FunctionGraph v1 allows you to manage function logs using AOM.
  • FunctionGraph v2 allows you to manage function logs using LTS, but does not support log download.
  1. Return to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the desired function.
  3. Click Monitoring.
  4. On the Logs page, select a version and time range, and click Download Log.

    NOTE:

    A maximum of 5000 logs can be downloaded at a time. When querying logs, select a proper time range to avoid log loss.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback