Managing Log Streams
LTS manages logs by log stream. Each log stream belongs to exactly one log group, while a log group can contain multiple log streams.
Collected logs of different types are classified and stored in different log streams for easier log management. If there are a large number of logs, you can create multiple log streams and name them for quick log search. For example, you can sort operation logs and access logs into different log streams, making it easier to find specific logs when you need them. You can add tags to log streams to help O&M personnel manage services.
A maximum of 100 log streams can be created in a log group. If you cannot create a log stream, delete unnecessary log streams and try again, or create log streams in another log group.
Prerequisites
You have created a log group.
Creating a Log Stream
- Log in to the LTS console.
- On the Log Management page, click
on the left of the target log group.
- Click Create Log Stream. On the displayed page, set log stream parameters by referring to Table 1.
Table 1 Log stream parameters Parameter
Description
Log Group Name
Defaults to name of the log group to which the log stream belongs and be unmodifiable.
Stream Type
NOTE:This function is available only to whitelisted users. To use it, submit a service ticket.
Select a log stream type as required.
- Standard log streams support all LTS functions and are designed to build a complete observability system.
- Search log streams support only keyword-based search. They do not support quick analysis, statistical charts, log analysis, and SQL alarms. They are ideal for log search scenarios. They offer a cost advantage, with index traffic fees reduced by 69% compared to standard log streams. For details, see Billing Items.
Log Stream Name
LTS automatically generates a default log stream name. You are advised to customize one based on your service. You can also change it after the log stream is created. The naming rules are as follows:
- Use only letters, digits, hyphens (-), underscores (_), and periods (.). Do not start with a period or underscore or end with a period.
- Enter 1 to 64 characters.
- Each log stream name must be unique.
Enterprise Project Name
Select the required enterprise project. The default value is default. You can click View Enterprise Projects to view all enterprise projects.
- You can use enterprise projects only after enabling the enterprise project function. For details, see Enabling the Enterprise Project Function.
- You can remove resources from an enterprise project. For details, see Removing Resources from an Enterprise Project. If you select multiple log streams when creating a log transfer task, these selected log streams cannot be removed.
Log Storage
If this function is disabled, Log Retention (Days) cannot be enabled.
- If this function is enabled, logs will be stored in the search engine and all log functions are available.
- If this function is disabled, logs will not be stored to LTS. This saves on index traffic and storage costs, but disables log search, analysis, alarm, consumption, and processing. You will only be allowed to use metric generation and log transfer functions.
Log Retention (Days)
Specify the log retention period for the log stream, that is, how many days the logs will be stored in LTS after being reported to LTS.
By default, logs are retained for 30 days. You can set the retention period to one to 365 days.
- If you enable Log Retention (Days) for the log stream, logs are retained for the period set for the log stream.
- If you disable Log Retention (Days) for the log stream, logs are retained for the period set for the log group.
- The logs that exceed the retention period will be automatically deleted. You can transfer logs to OBS buckets for long-term storage.
NOTE:Currently, only whitelisted users can submit service tickets to apply for extending the log retention period to 1,095 days. A test is required to evaluate whether the underlying resources in your regions support 1,095-day retention.
Cold Tiered Storage
Intelligent cold storage, which is available to whitelisted users. Set it as required after enabling Log Retention (Days). For details, see Intelligent Cold Storage.
This function is available only when Log Retention (Days) is set to more than seven days.
Standard Storage (Days)
Specify how long data will be retrained in standard storage. This option is mandatory if Cold Tiered Storage is enabled.
Data in the standard storage must be stored for at least seven days before being transitioned to intelligent cold storage. Log data stored beyond Standard Storage (Days) but within Log Retention (Days) will be automatically transitioned to intelligent cold storage.
Anonymous Write
Anonymous write is disabled by default. Only logs reported by Android, iOS, applets, and browsers can be written anonymously. To use this function, submit a service ticket to add your account to the whitelist.
If anonymous write is enabled for a log stream, no valid authentication is required, which may lead to the generation of dirty data.
NOTE:The function of using anonymous write to collect logs is available only to whitelisted users in regions CN North-Beijing4, CN East-Shanghai1, and CN South-Guangzhou. To use it, submit a service ticket.
Shards
This parameter is valid only for log consumption. Each shard has a limit of 5 MB/s for writes and 10 MB/s for reads. When the log read/write traffic exceeds these limits, LTS automatically adds more shards. You can also manually add shards. The value ranges from 1 to 64.
Click View Shard Details to view the shards' statuses and creation time.
NOTE:This function is available only to whitelisted users. To use it, submit a service ticket.
Tag
Tag the log stream as required. Click Add and enter a tag key and value. To add more tags, repeat this step. A maximum of 20 tags can be added.
Tag key restrictions:
- A tag key can contain letters, digits, spaces, and special characters (_.:=+-@), but cannot start or end with a space or start with _sys_.
- A tag key can contain up to 128 characters.
- Each tag key must be unique.
Tag value restrictions:
- A tag value can contain letters, digits, spaces, and the following special characters: _.:=+-@
- A tag value can contain up to 255 characters.
Tag policies:
If your organization has configured tag policies for LTS, follow the policies when adding tags to log groups, log streams, log ingestion configurations, and host groups. Non-compliant tags may cause the creation of these resources to fail. Contact your administrator to learn more about the tag policies. For details about tag policies, see Overview of a Tag Policy. For details about tag management, see Managing Tags.
Deleting a tag:
Click Delete in the Operation column of the tag.
WARNING:Deleted tags cannot be recovered.
If a tag is used by a transfer task, you need to modify the task configuration after deleting the tag. For details about transfer, see Transferring Logs to OBS.
Remark
Enter remarks. The value contains up to 1,024 characters.
- Click OK. The created log stream will be displayed under the log group.
Figure 1 Creating a log stream
- You can view the log stream billing status. For details, see Price Calculator.
- The function of reporting SDRs by log stream is in Friendly User Test (FUT). You can submit a service ticket to enable it.
Intelligent Cold Storage

Currently, this function is available only to whitelisted users in regions CN North-Beijing4, CN South-Guangzhou, and CN East-Shanghai1. To use it, submit a service ticket.
LTS provides cold and standard storage. Cold storage costs less but responds slowly, and is more suitable for data that needs to be stored for a long time.
- On the page for creating or modifying a log stream, you can enable intelligent cold storage to transition data from standard storage to cold storage.
- If you increase the value of Standard Storage (Days) after intelligent cold storage is enabled, the cold storage period takes effect only for the newly generated data. Data already in cold storage will not be transitioned back to standard storage.
- After intelligent cold storage is enabled, log data in cold storage cannot be queried using log analysis, dashboards, scheduled SQL tasks, or pipe-character-based search modes. When using these search modes, you must specify a query time range within the standard storage period.
Item |
Standard Storage |
Cold Storage |
---|---|---|
Application scenario |
High-frequency data query |
Low-frequency data query |
Query and analysis performance |
High, response in seconds |
Relatively low, response with a delay of 8s |
Performance of log analysis and dashboards |
High, response in seconds |
Not supported |
Storage price |
$0.000125 USD/GB-hour |
$0.00003993 USD/GB-hour |
Modifying a Log Stream
By default, a log stream inherits the log retention setting from the log group it belongs to.
- In the log stream list, locate the target log stream and click Modify in the Operation column.
- On the page displayed, modify the stream name, log retention period, and tags.
You can modify the number of shards. Click View Shard Details to view the shards' statuses and creation time.
- Click OK.
- After the modification is successful, move the cursor over the log stream name to view the new and original names along with the log stream ID.
Deleting a Log Stream
You can delete a log stream that is no longer needed. Deleting a log stream will also delete the log data in the log stream.
Before deleting a log stream, check if it is being used by other services, such as log ingestion configurations, log transfer tasks, or log alarm rules. Deleting it while in use may interrupt log reporting.

Deleting a log stream may lead to exceptions in related log tasks. In addition, deleted log streams cannot be restored.
- In the log stream list, locate the target log stream and click Delete in the Operation column.
- Enter DELETE in the text box or click Auto Enter, and click OK.
Figure 2 Deleting a log stream
Other Operations
- Searching for log streams using the following filter criteria:
- Log Stream Name/ID: log stream name or ID (hover your cursor over the log stream name to view the ID)
- Original Log Stream Name/ID: original log stream name (defined during log group or log stream creation) and ID (hover your cursor over the log stream name to view the ID)
- Tag: tags set for a log stream
- Remark: remarks customized during log stream creation.
- Adding a log stream to favorites: Click More > Edit in the Operation column of a log stream. On the displayed dialog box, enable My Favorites and/or My Favorites(Local Cache). The stream is then displayed in the My Favorites/My Favorites(Local Cache) list.
- Viewing log stream details: Click More > Details in the Operation column of a log stream to view its details, including its name, ID, and creation time.
- Diagnosing ICAgent collection: Enable ICAgent Diagnosis first by referring to Setting ICAgent Collection. Click More > ICAgent Collect Diagnosis in the Operation column of the desired log stream to view the exceptions, overall status, and collection status of its ICAgent.
- Monitoring traffic: Click More > Monitor Traffic in the Operation column of the desired log stream to view its resource usage details and most used resources. (This function is available only to whitelisted users who have enabled the observability function. For details, see Setting LTS Log Collection Quota and Usage Alarms.)
Helpful Links
You can call APIs to create, modify, delete, and query log streams. For details, see Log Stream Management.
Feedback
Was this page helpful?
Provide feedbackThank 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