You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Resource management
Log topic
Copy page
Download PDF
Log topic
The log topic is the basic unit for log management in Torch log service (TLS). Functions such as log collection, query and analysis, and consumption are all performed at the topic level. This topic introduces common management operations for log topics, including how to create, modify, and delete topics.​
Prerequisites​
A project has been created. For detailed steps, see Log project.​
Notice​
  • Up to 200 log topics can be created for each project. To increase the quota, go to Quota Center and apply to raise the parameter total_topics_per_project for quota.​
  • If the data exceeds read/write capability of the shard, data write may fail. To avoid data write failure, we recommend that you enable automatic shard splitting.​
Create topic​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. On the left navigation bar, select Resource Management > Project .​
  1. On the Project page, find the specified project and click the project name​
  1. In Topic section, click Create topic.​
  1. In the Create topic dialog box, complete the following configurations.​
  1. Fill in the basic configurations​
  • ​
    Parameters​
    Description​
    Topic name​
    Name of the log topic.​
    • Length must be between 3 and 64 characters.​
    • Only supports Chinese, lowercase letters, numbers, underscores (_), and hyphens (-).​
    • Can not start or end with a hyphen (-) or underscore (_).​
    • Can not start with tls_, tos_, or other reserved prefixes.​
    Record external IP​
    Record extranet IP, can be enabled or disabled. By default, it is enabled. When enabled, the log service automatically adds the following metadata fields to the log content:​
    • __tag____client_ip__: the public IP address of the device where the log originates.​
    • __tag____receive_time__: the time the log reaches the server, formatted as a 10-digit Unix timestamp.​
    Notice​
    When writing logs via WebTracking, TLS records the source device's public IP address through clientAddr.​
    Billing mode​
    Set the billing mode for this log topic.​
    • Billing by features: charges are based on actual resources used (such as index, storage, etc.) and features (such as data transformation, log shipping, etc.), and you pay based on usage.​
    • Billing by ingested-data: charges apply to the volume of data written (original size). After data is written, a 30-day free storage period is provided, and you can use data transformation, log shipping, and other features free of charge.​
    Description​
    A brief description of the log topic.​
    Tags​
    Set tags for the log topic.​
    Tags identify and classify cloud resources. You can categorize log projects and topics by tags to facilitate resource search and aggregation. For more details, see Tag overview.​
    • Inherit tags: Click on the project tag in the log to inherit the tag.​
    • Add new tag: Click Add tag and enter the tag key and tag value.​
    ​
  1. Configure log storage time.​
  • TLS supports standard storage, infrequent access storage, and archive storage. For details, see Storage types.​
Notice​
Logs that exceed specified storage time will be automatically deleted.​
  • ​
    Parameters​
    Description​
    Standard storage​
    The storage time for logs in the standard access layer. The unit is day. The valid range is 1 to 3650 days. If you specify the parameter as 3650 days, the storage time becomes permanent.​
    • When infrequent access storage is enabled, the standard storage retention period ranges from 7 to 3650 days.​
    • When infrequency access storage and archive storage are enabled, the standard storage period ranges from 7 to 3650 days.​
    • When archive storage is enabled but infrequency access storage is disabled, the standard storage duration ranges from 30 to 3650 days.​
    Infrequent access storage (IAS)​
    ​
    The log retention period in the TLS infrequent access storage layer is measured in days. The valid range is 1 to 3650. If the parameter is set as 3650 days, the storage time becomes permanent.​
    If infrequent access storage is enabled, logs will be stored in standard layer for a period of time before they are automatically converted to infrequent access storage.​
    Archive storage​
    The storage period of logs in the archive storage layer of the log service. The units in day. The value range is 60 to 3650. If you specify the parameter as 3650, the storage time becomes permanent.​
    If archive storage is enabled, logs will be stored in standard layer or infrequent access layer for a period of time before they are automatically converted to archive storage.​
    ​
  1. Fill in shard configuration.​
  • ​
    Parameters​
    Description​
    Number of shards​
    The number of log shards. Each shard provides write capacity of 5 MiB/s and 500 times/s, and read capacity of 20 MiB/s and 100 times/s.​
    After creation, modifying the number of shards is not supported. However, the overall read and write capacity of the log topic can be increased through automatic split feature.​
    Automatic sharding​
    Automatic sharding can be enabled or disabled.​
    • (default) Enabled: When the amount of written data exceeds the existing shard service capacity continuously for 5 minutes, TLS automatically splits shards based on data volume to meet business needs. However, the number of shards after splitting can not exceed the maximum number of splits. New partitions created within the last 15 minutes will not split automatically.​
    • Disabled: automatic sharding is not enabled.​
    Maximum number of splits​
    Maximum number of shard splits, i.e., the maximum number of all read-write state shards after shard splitting.​
    Notice​
    • The number of maximum shards is required to set only when Automatic sharding is enabled.​
    • If the maximum number of splits is less than or equal to the number of log shards, auto-splitting is not available.​
    ​
  1. Fill in advanced configuration.​
  • ​
    Parameters​
    Description​
    WebTracking​
    WebTracking can be enabled or disabled. If enabled, you can quickly collect frontend tracking data through it.​
    Notice​
    After enabling WebTracking for a log topic, data written via the WebTracks API does not require authentication. This grants anonymous write access to the public network, but it may cause dirty data. For more details, see Use WebTracking to collect logs.​
    ​
  1. Click create.​
Edit log topic configuration​
To modify the topic name, log storage period and other configurations, you can edit log topic. You can also modify them directly in log topic list. Basic settings such as name and description support direct editing. TLS automatically assigns an ID to each log topic. This ID can not be changed.​
Tip​
  • The number of log shards can not be changed currently.​
  • When auto split is enabled, if the maximum number of splits is less than or equal to the number of log shards, auto-splitting will fail.​
  1. Go to Project page.​
  1. On the top navigation bar, select the region where TLS is located.​
  1. On the left navigation bar, select Resource management > Project.​
  1. Click the specified project name.​
  1. In Topic section, locate the specified log topic and click "..." in the Actions column. And then click Edit.​
  • You can also directly modify the log topic name and description in the topic list.​
  1. Reset related configurations for the log topic.​
  1. Click OK.​
Modify log storage time​
  1. Go to Project page.​
  1. On the top navigation bar, select the region where TLS is located.​
  1. On the left navigation bar, select Resource management > Project.​
  1. Click the specified project name.​
  1. In the Topic section, locate the specified log topic and click "..." in the Actions column. And then click Edit.​
  • You can quickly query the specified log topic by its name, ID, or description.​
  1. Reset the log storage period in Log storage time configuration.​
  1. Click OK.​
Import log topic​
TLS supports batch import of specified log topics and their index configurations across regions and projects.​
  1. Go to Project page.​
  1. On the top navigation bar, select the region where TLS is located.​
  1. On the left navigation bar, select Resource management > Project.​
  1. Click the specified project name.​
  1. In the Topic section, click Import Topic.​
  1. On Topic Import Task page, complete the following configurations, and then click Next step: execute the task.​
  • ​
    Parameters​
    Notice​
    Source region​
    Select the region where the log topic that needs to be imported is located.​
    Source project​
    Select the project that contains the topic that needs to be imported.​
    Source topic​
    Select the topic that needs to be imported. Up to 100 topics can be imported at once.​
    If Import indexes simultaneously is enabled, the indexes of the source log topics will also be imported.​
    ​
  1. Confirm that the log topic import task is complete.​
  • After confirmation, you can click Finish or click Continue to import collection rules. For instructions on importing collection configurations, see Import Acquisition Configuration .​
Delete topic​
Warning​
  • Before deleting a topic, make sure you have removed all related LogCollector collection configurations. For detailed steps to delete a collection configuration, refer to Delete Acquisition Configuration .​
  • Certain dedicated log topics, such as those related to service logs, can not be deleted.​
  • After deleting a log topic, all log data and configuration information within it will be permanently deleted and can not be recovered. Proceed with caution.​
  1. Go to Project page.​
  1. On the top navigation bar, select the region where TLS is located.​
  1. On the left navigation bar, select Resource management > Project.​
  1. Click the specified project name.​
  1. In Topic section, locate the specified log topic and click "..." in the Actions column. And then click Delete.​
  1. In the pop-up dialog box, check the information of the topic to be deleted. Enter the topic name in delete confirmation box, and click Delete.​
  • The dialog box displays resources associated with this topic. If there are linked resources, you can click To delete to remove the relevant resources first.​
View topic usage​
You can check the usage of a specific log topic within a given time range on the TLS dashboard.​
  1. Go to Project page.​
  1. On the top navigation bar, select the region where TLS is located.​
  1. On the left navigation pane, select Resource management > Project.​
  1. Click the specified project name.​
  1. In the Topics tab on the left navigation pane, click the expand button in front of the specified log topic. Then click Cloud monitoring.​
  1. View resource usage and running state of the current log topic.​​​
​
​
Last updated: 2026.04.23 18:52:56