Data Storage Policies¶
As business applications increase, the scope of data monitoring requirements expands, and the need for storage duration of different data types will also adjust accordingly.
TrueWatch provides various data storage policies. You can customize your data storage duration according to your needs, thereby effectively controlling data storage costs and saving expenses.
Data Storage Duration¶
Metrics¶
| Storage Type | Optional Duration |
|---|---|
| Standard Storage Duration | 3 / 7 / 14 / 30 / 60 / 90 days (original precision storage) |
| Long-term Storage Duration | Off / 90 / 120 / 180 / 360 days |
Note
- Metrics within the standard storage period maintain original precision and support high-performance chart interaction.
- After enabling long-term storage, the system will automatically apply downsampling rules based on the data storage time, significantly saving storage space. The downsampling algorithm retains the maximum value within each time period, ensuring key data is not lost.
- The long-term storage duration must be greater than the standard storage duration.
Downsampling rules are as follows:
| Data Storage Time | Precision |
|---|---|
| Within Standard Storage Duration | Original Precision |
| Exceeds Standard Storage Duration | 1 minute |
| Exceeds 60 days | 5 minutes |
| Exceeds 90 days | 10 minutes |
| Exceeds 120 days | 30 minutes |
| Exceeds 180 days | 60 minutes |
The above rules are executed progressively in tiers. When data storage time meets multiple conditions simultaneously, the precision from the higher tier applies.
Note
The long-term storage feature is only supported for workspaces billed by data points. Workspaces billed by time series do not currently support this feature. To adjust the billing method, please contact your account manager.
Logs¶
| Storage Type | Optional Duration |
|---|---|
| Standard Storage Duration | 3 / 7 / 14 / 30 / 60 / 90 days |
| Long-term Storage Duration | Off / 90 / 120 / 180 / 360 days |
Note
- Logs within the standard storage period support queries for any time range and are suitable for high-frequency query scenarios like Explorer and dashboards.
- Logs within the long-term storage period are suitable for low-frequency queries. The maximum time range for a single query is 24 hours.
- Long-term storage billing is calculated based on the original storage volume of log data within the current total long-term storage cycle. The statistical scope includes data within the standard storage cycle.
Other Data Types¶
| Data Type | Optional Duration |
|---|---|
| Data Forwarding-TrueWatch | 180 / 360 / 720 days |
| Events | 14 / 30 / 60 days |
| APM & LLM-Trace | 3 / 7 / 14 / 30 / 60 / 90 days |
| APM-Profile | 3 / 7 / 14 / 30 / 60 / 90 days |
| RUM | 3 / 7 / 14 / 30 / 60 / 90 days |
Change Storage Policy¶
Steps¶
- Go to Management > Workspace Settings > Change Data Storage Policy.
- Click Change.
- Select the data type for which you want to modify the storage policy, then click Edit.
- Select the storage duration.
- If you need to enable long-term storage, turn on the "Enable Long-term Storage" switch and select the long-term storage duration. After configuration, a preview diagram of the storage policy will be displayed in the pop-up window, visually showing the precision changes at different stages.
- After making changes, click Confirm to change the data storage duration for the current workspace.
Effective Rules¶
- First modification of the day: Takes effect immediately.
- Multiple modifications on the same day: The last modification takes precedence and becomes effective the next day.
- After the policy change, the system determines the data expiration range based on the latest configuration and performs cleanup at 00:00 the next day.
Important Notes for Changes¶
- Permission Restriction: Only the owner of a Commercial Plan workspace can perform this operation.
- After changing the metric storage policy, data under the old policy will be deleted immediately. Please proceed with caution.
-
After changing the log storage policy:
- New data: Stored and billed immediately according to the new policy.
- Old data: Continues to exist until rolled off for deletion and is billed according to the original policy.
-
For other data types (excluding logs and metrics) such as events, Trace, Profile, etc., after changing the policy:
- New data: Stored and billed immediately according to the new policy.
- Old data: Continues to exist until rolled off for deletion and is billed according to the original policy.
Scenario Examples¶
- Metrics: Shorten standard storage time (14 days → 7 days). Data generated before the adjustment point will be deleted immediately.
- Logs: Shorten retention time (14 days → 7 days): Data generated before the adjustment point will still be billed according to the 14-day policy until cleared. Subsequent data will be billed according to the 7-day policy.
- Extend retention time (7 days → 14 days): Data generated before the adjustment point will still be billed according to the 7-day policy. Subsequent data will be billed according to the 14-day policy.
Log Query Mode Explanation¶
After enabling log long-term storage, the Log Explorer supports two query modes:
- Standard Query: Queries logs within the standard storage range, supporting any time range, fast switching, and real-time response.
- Long-term Query: Queries logs within the long-term storage range. Status distribution charts are not displayed. You need to select a date first. The time range is defaulted to 00:00:00 - 23:59:59. You can freely adjust it and then click Query to trigger, or quickly switch dates using the "Previous" and "Next" buttons.
When the query range exceeds the standard storage duration:
-
In Standard Query mode, if the selected time range exceeds the standard storage duration, the system will only return log data within the standard storage range. The system will prompt you that the current query range has exceeded the log standard storage duration (X days). To view logs older than X days, you need to switch to Long-term Query.
-
In dashboards, metric analysis, or query tools, if a chart includes a log query and the time range exceeds the standard storage limit:
-
If data exists within the standard storage range: The chart displays data from that range, along with a "Query result is incomplete" message. This means the chart only shows log data within the standard storage range and does not include long-term storage logs. To query long-term storage logs, please reduce the single query time range to within 24 hours and query separately.
-
If no data exists within the standard storage range: The system will automatically query long-term storage data for the end date of the selected time range, along with a "Query result is incomplete" message. This means that since long-term storage logs only support a single query range of 24 hours, the system has automatically queried data for the end date of the selected time range. To view more long-term storage logs, please reduce the single query time range to within 24 hours and query separately.
-
Further Reading¶
Next, you might want to learn about:


