Data Storage Policy¶
As business applications increase, the scope of data monitoring requirements continues to expand, and the retention period requirements for different types of data change accordingly.
TrueWatch provides multiple data storage policies. You can customize data retention periods based on your needs to effectively control data storage costs and save money.
Data Retention Periods¶
Metrics¶
| Storage Type | Available Periods |
|---|---|
| Standard Storage Period | 3 / 7 / 14 / 30 / 60 / 90 days (raw resolution storage) |
| Long-term Storage Period | Off / 120 / 180 / 360 / 540 / 720 days |
Notes
- During the standard storage period, metrics retain their original resolution and support high-performance chart interactions;
- After long-term storage is enabled, the system automatically applies downsampling rules based on data storage duration, significantly saving storage space. The downsampling algorithm retains the maximum value in each time interval to ensure that critical data is not lost;
- The long-term storage period must be longer than the standard storage period.
Downsampling rules:
| Data Storage Time | Resolution |
|---|---|
| Within the standard storage period | Original resolution |
| More than the standard storage period and no more than 90 days | 1 minute |
| More than 90 days and no more than 180 days | 5 minutes |
| More than 180 days and no more than the long-term storage period | 10 minutes |
The long-term storage period is the total retention period for metric data and is not additive with the standard storage period; resolution stages without a corresponding time range do not apply.
Note
Long-term storage for metrics is supported only with billing by data points. If metrics in the current workspace are billed by time series, you must first adjust the metric billing method, and then enable long-term storage.
Adjust Metric Billing Method¶
Existing workspaces where metrics are billed by time series can be switched to billing by data points through self-service, without submitting a request.
- Only the Workspace Owner can perform the switch;
- Workspaces under new Billing Center accounts do not display the Adjust Billing Method entry.
Steps:
- In Data Storage Policy, click Edit for Metrics;
- To the right of Enable Long-term Storage, click Adjust Billing Method;
- In the secondary confirmation dialog box, confirm the impact of the billing change and click Confirm Switch. After the switch, metrics in the current workspace will be changed from billing by time series to billing by data points, and related costs may change;
- After the switch is successful, the Enable Long-term Storage switch becomes operable again and remains off by default. To use it, enable it manually, configure the long-term storage period, and then click OK to save.
Logs¶
The overall log storage system consists of three parts: Standard Storage, Long-term Storage, and LogBamboo Cold Storage. For the purposes and retention scope of the three storage types, see Log Storage; the following table lists the available periods for Standard Storage and Long-term Storage in the platform.
| Storage Type | Available Periods |
|---|---|
| Standard Storage Period | 3 / 7 / 14 / 30 / 60 / 90 days |
| Long-term Storage Period | Off / 90 / 120 / 180 / 360 days |
Notes
- Logs within the standard storage period support queries over any time range and are suitable for high-frequency query scenarios such as Explorer and dashboards;
- Logs within the long-term storage period are suitable for low-frequency queries, and the maximum time range for a single query is 24 hours;
- Long-term log storage calculates, on a daily basis, all logs that have exceeded the standard storage period and are still within the total retention period, measured by pre-compression size (per GB/day).
For example, when the standard storage period is 30 days and the long-term storage period is 180 days, the most recent days 1–30 are in standard storage, the most recent days 31–180 are in long-term storage, and the total retention period on the platform is 180 days. The backup scope and retention policy of LogBamboo Cold Storage are configured independently; for details, see LogBamboo Cold Storage.
Other Data Types¶
| Data Type | Available Periods |
|---|---|
| Data Forwarding - TrueWatch | 180 / 360 / 720 days |
| Events | 14 / 30 / 60 days |
| APM & LLM - Traces | 3 / 7 / 14 / 30 / 60 / 90 days |
| APM - Profiles | 3 / 7 / 14 / 30 / 60 / 90 days |
| RUM | 3 / 7 / 14 / 30 / 60 / 90 days |
| Synthetic Monitoring | 3 / 7 / 14 / 30 / 60 / 90 days |
| Data Observability | 3 / 7 / 14 / 30 / 60 / 90 days |
Change Storage Policy¶
Steps¶
- Go to Manage > Workspace Settings > Change Data Storage Policy;
- Click Change;
- Select the data type whose data storage policy you need to modify, and click Edit;
- Select the retention period;
- If you need to enable long-term storage, turn on the "Enable Long-term Storage" switch and select the long-term storage period. If metrics in the current workspace are billed by time series, you must first adjust the metric billing method. After configuration is complete, the dialog box displays a storage policy preview that visually presents changes in storage resolution at different stages;
- After the modification is complete, click OK to change the data retention periods in the current workspace.
Effective Rules¶
- First modification of the day: takes effect immediately;
- Multiple modifications on the same day: the last modification prevails and takes effect the next day;
- After a policy change, the system determines the data expiration scope based on the latest configuration and performs cleanup at 00:00 the next day.
Change Notes¶
- Permission restriction: Only the Workspace Owner can perform this operation;
- After the metric storage policy is changed, data under the old policy will be deleted immediately; proceed with caution;
-
After the log storage policy is changed:
- New data: stored and billed immediately according to the new policy;
- Old data: remains until rolling deletion and is billed according to the original policy;
-
For data types other than logs and metrics (events, traces, profiles, etc.), after the policy is changed:
- New data: stored and billed immediately according to the new policy;
- Old data: remains until rolling deletion and is billed according to the original policy.
Example Scenarios¶
- Metrics: shortening the standard storage period (14 days → 7 days) immediately deletes data generated before the adjustment time;
- Logs: shortening the retention period (14 days → 7 days): data generated before the adjustment time continues to be billed according to the 14-day policy until it is deleted; data generated afterward is billed according to the 7-day policy;
- Extending the retention period (7 days → 14 days): data generated before the adjustment time continues to be billed according to the 7-day policy; data generated afterward is billed according to the 14-day policy.
Log Query Modes¶
After long-term log storage is enabled, Log Explorer supports two query modes:
- Standard query: queries logs within the standard storage range, supporting any time range, quick switching, and real-time responses;
- Long-term query: queries logs within the long-term storage range and does not display the status distribution chart. You must first select a date; the time range is populated by default with 00:00:00 - 23:59:59. You can adjust it freely and click Query to trigger the query, or use the "Previous" and "Next" buttons to quickly switch dates.
When the query range exceeds the standard storage period:
-
In standard query mode, if the selected time range exceeds the standard storage period, the system returns only log data within the standard storage range and prompts you that the current query range has exceeded the log standard storage period (X days). To view logs older than X days, switch to long-term query.
-
In dashboards, Metrics Analysis, or query tools, if a chart includes a log query and the time range exceeds the standard storage limit:
-
Data exists within the standard storage range: the chart displays data in that range and shows "Incomplete query results". That is, the chart displays only log data within the standard storage range and does not include long-term storage logs. To query long-term storage logs, reduce the time range of each query to within 24 hours and query them separately;
-
No data exists within the standard storage range: the system automatically queries long-term storage data for the day of the end date of the selected time range and shows "Incomplete query results". That is, because long-term storage logs support only a 24-hour range per query, the system has automatically queried data for the day of the end date of the selected time range. To view more long-term storage logs, reduce the time range of each query to within 24 hours and query them separately.
-
Further Reading¶
You may want to learn about:


