Project Data Retention Time Settings
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 586
Description
### Problem Statement
In Sentry, the following configuration can control the data retention days for all projects.
```
SENTRY_OPTIONS["system.event-retention-days"] = int(
env("SENTRY_EVENT_RETENTION_DAYS", "60")
)
```
In Snuba, the following configuration can override the retention settings in Sentry.
```
ENFORCE_RETENTION: bool = False
LOWER_RETENTION_DAYS = 30
DEFAULT_RETENTION_DAYS = 90
VALID_RETENTION_DAYS = set([30, 90])
```
However, these configurations cannot set different data retention times for different projects. In real business scenarios, the data retention requirements vary for different projects. For example, Java and Go backend services can have shorter data retention periods, but APM data for the Android platform requires at least six months of retention. Currently, this cannot be achieved.
### Solution Brainstorm
Add a retention time configuration in the Project Settings page of Sentry. If the retention time is configured in the Project Settings page, it will take precedence; otherwise, the default retention time will be applied.

### Product Area
Settings - Projects
Contributor guide
Assessment
This issue has not been assessed yet.