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

Torch Log Service

Copy page
Download PDF
Resource management
Metric topic
Copy page
Download PDF
Metric topic
You can create multiple log topics and metric topics within a single project in TLS. The metric topic is a unit for collecting, storing, and querying time-series data in TLS.​
This topic describes common management operations for metric topics, including creating, modifying, and deleting metric topics.​
Notice​
Metric topic is now in closed beta. If you have business needs, contact your account manager for allowlist access.​
Related concepts​
Metric topics in TLS are used to collect and analyze time-series data. Before using metric topics, you need to know the following concepts:​
​
Related concepts​
Description​
Time series​
Time series (also known as time series) are the basic elements of Prometheus data. It is named by a metrics name and a set of labelsets, and is arranged by timestamp.​
Sample​
Each point in a time series is called a sample. Each sample consists of three parts.​
​
{------------------metric--------------------}{--timestamp--}{--value--}​
http_request_total{status="200", method="GET"}@1434417560938 => 94355​
​
  • Metric: consists of a metric name and a labelsets that describes the current sample's characteristics.​
  • Timestamp: A timestamp accurate to milliseconds.​
  • Value: A float64 number that represents the value of the current sample.​
PromQL​
PromQL (Prometheus Query Language) is Prometheus's built-in data query language. It enables querying, aggregating, and performing logical operations on time series data.​
​
Billing notes​
After creating a metric topic, a workspace named after the metric topic ID is automatically created in managed Prometheus. For billing details, see Overview of managed Prometheus billing.​
Prerequisites​
  • A project has been created. For detailed steps, see Log project.​
Notice​
  • You can create up to 100 metric topics in each region.​
  • 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.​
  • TLS provides unified access and metric queries, and depends on limits of the managed Prometheus workspace. For details, see Managed Prometheus usage limits.​
Create metric topic​
  1. Log in to TLS console.​
  1. On the top navigation bar, select the region where the log service is located.​
  1. On the left navigation pane, select Resource management > Project.​
  1. On the Project page, locate the specified project and click the project name.​
  1. In the Topic area, click Create metrics topic.​
  1. In Create metrics topic dialog box, configure the following settings.​
  1. Enter the basic configuration.​
  • ​
    Parameters​
    Description​
    Topic name​
    Name of the metric topic​
    Description​
    A brief description of the metric topic​
    Tags​
    Click Add tag, enter the tag key and tag value to add tags to the metric 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.​
    ​
  1. Enter the split configuration.​
  • ​
    Parameters​
    Description​
    Number of shards​
    The number of log shards.​
    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 sharding 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. The value range is 1 to 256.​
    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. Enter the storage time configuration.​
  • Configure the log storage time. Logs that store longer than the specified storage time will be deleted automatically. Support configuration for 15 days, 30 days, 90 days, 180 days, or 1 year.​
  1. Click Create.​
Edit metric topic​
You can modify the name, storage duration, and other settings. You can also update the topic name and description directly from the metric topic list. TLS automatically assigns an ID to each metric topic. This ID cannot be changed.​
Notice​
  • Modifying the number of shards for metric topics is not currently supported.​
  • Adjustment between 15 days and 30 days of storage duration is not supported.​
  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 Metric topic section, locate the metric topic and click Edit in the Actions column.​
  • You can also edit the metric topic name, description, and other details directly in the metric topic list.​
  1. Reset the relevant configurations for the metric topic.​
  • You can modify the metric topic name, storage period, auto split shards, and maximum number of splits.​
  1. Click OK.​
Delete metric topic​
  • Before deleting a metric topic, make sure all related LogCollector collection configurations are removed. For steps to delete a collection configuration, refer to Delete collection configuration.​
  • After you delete the metric topic, all associated metric data and configuration information will be permanently deleted and cannot be recovered. Proceed with caution.​
  • When you delete a metric topic, the associated managed Prometheus workspace will also be automatically deleted.​
  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 Topic section, locate the specified topic and select ... in the Actions column. Then click Delete.​
  1. In the pop-up dialog, confirm the information of the topic to be deleted, enter the topic name, and click Delete.​
  • The dialog displays resources associated with the topic. If there are linked resources, you can click To delete to remove the relevant resources first.​
​
Last updated: 2025.12.24 17:53:10