tencent cloud

Serverless Cloud Function

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Related Concepts
How It Works
Strengths
Scenarios
Related Products
Purchase Guide
Billing Overview
Billing Mode
Billable Items and Billing Modes
Function Computing Power Support
Free Tier
SCF Pricing
Billing Example
Payment Overdue
Getting Started
Creating Event Function in Console
User Guide
Quota Management
Managing Functions
Web Function Management
Log Management
Concurrence Management
Trigger Management
Function URL
A Custom Domain Name
Version Management
Alias Management
Permission Management
Running Instance Management
Plugin Management
Managing Monitors and Alarms
Network Configuration
Layer Management
Execution Configuration
Extended Storage Management
DNS Caching Configuration
Resource Managed Mode Management
Near-Offline Resource Hosting Model
Workflow
Triggers
Trigger Overview
Trigger Event Message Structure Summary
API Gateway Trigger
COS Trigger
CLS Trigger
Timer Trigger
CKafka Trigger
Apache Kafka Trigger
MQTT Trigger
Trigger Configuration Description
MPS Trigger
CLB Trigger Description
TencentCloud API Trigger
Development Guide
Basic Concepts
Testing a Function
Environment Variables
Dependency Installation
Using Container Image
Error Types and Retry Policies
Dead Letter Queue
Connecting SCF to Database
Automated Deployment
Cloud Function Status Code
Common Errors and Solutions
Developer Tools
Serverless Web IDE
Calling SDK Across Functions
Third-Party Tools
Code Development
Python
Node.js
Golang
PHP
Java
Custom Runtime
Deploying Image as Function
Web Framework Development
Deploying Framework on Command Line
Quickly Deploying Egg Framework
Quickly Deploying Express Framework
Quickly Deploying Flask Framework
Quickly Deploying Koa Framework
Quickly Deploying Laravel Framework
Quickly Deploying Nest.js Framework
Quickly Deploying Next.js Framework
Quickly Deploying Nuxt.js Framework
Quickly Deploying Django Framework
Use Cases
Overview
Solutions with Tencent Cloud Services
Business Development
TRTC Practices
COS Practices
CKafka Practice
CLS
CLB Practice
MPS
CDN
CDWPG
VOD
SMS
ES
Scheduled Task
Video Processing
Success Stories
Tencent Online Education
Online Video Industry
Tencent Online Education
Best Practice of Tencent IEG Going Global
API Documentation
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
SDK Documentation
FAQs
General
Web Function
Billing FAQs
Network FAQs
Log FAQs
SCF utility class
Event Handling FAQs
API Gateway Trigger FAQs
Related Agreement
Service Level Agreement
Contact Us
Glossary

Log Collection Overview

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-12-30 15:02:44

Scenarios

The log collection feature sends logs from the standard output of containers or from specific file paths within the container cluster where the workflow service is deployed to Tencent Cloud Log Service (CLS).
This feature is suitable for users who need to store and analyze task running logs.
The log collection feature should be manually enabled and configured with collection rules for each workflow service cluster. After the feature is enabled, a log collection agent runs within the cluster. Based on the collection source, CLS log topic, and log parsing method configured in the collection rules, the agent collects logs from the specified source and sends the content to the log consumer. You can refer to the following steps to enable the log collection feature for a cluster.

Basic Concepts

Log Types

You can enable either business logs or event logs.
Business logs: used to collect standard output (stdout) and standard error (stderr) logs from containers. Multiple collection rules can be configured. Logs are shipped to the specified log topic.
Event logs: used to collect events from the Kubernetes cluster where the workflow runs, including important events such as Pod creation, deletion, and scheduling.

Log Collection Agents

The agent used to collect log information is LogListener.

Log Rules

You can use log rules to specify the log collection source, log topic, log parsing mode, and filter configuration. The log collection agent monitors changes to log collection rules, and any changes take effect within a maximum of 10 seconds.
Note:
When you use an existing log topic, the indexing rules for different log types are as follows:
Business logs: It is recommended to configure pod_name, namespace, and container_name as indexes, making it easy to search.
Event logs: Indexes are automatically created, overriding the existing indexes of the topic. For more information, see Event Log Index Description.
It is recommended to create an independent log topic for log collection to avoid mixing with other online business operations.

Log Sources

Log sources include the standard output of specified containers and file paths within containers.
When you collect standard output logs from containers, you can select logs from all containers or from container services within specified Pod Labels as the collection source.
When you collect logs from container file paths, you can specify logs from file paths of containers within Pod Labels as the collection source.

Consumers

You can select a logset and log topic of CLS as the consumer.

Extraction Modes

The log collection agent supports sending collected logs to the user-specified log topic in the form of multi-line full text or JSON.

Filters

After the filter is enabled, you can collect only a subset of logs based on specified rules. The key supports exact matching, and the filtering rules support regular expression matching. For example, you can collect only logs where ErrorCode = 404.

Operation Steps

Enabling Log Collection

1. Log in to the Serverless Cloud Function (SCF) console. In the left sidebar, choose Data Engineering > Workflow.
2. On the Workflow page, click the service name to go to the workflow details page.
3. Select Log Management, and then choose to either add a business log collection configuration or enable event log collection, as shown in the following figure:



ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック