Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable option to truncate activity tracking logs after n days #270

Open
amcclain opened this issue Oct 5, 2022 · 1 comment
Open
Labels

Comments

@amcclain
Copy link
Member

amcclain commented Oct 5, 2022

We have some apps that track a fair amount of very granular activity, but it's not clear that there is much value in saving this data indefinitely at the cost of having the xh_track table rowcount increase in an unbounded way.

We should add a configurable option to have the server delete activity data older than a certain number of days. If enabled, this routine could be run once a day via a timer in TrackService.

Default value is up for discussion - safest is probably to have it disabled by default (although one could argue that having some limit on track entry storage is "safer" in another way). We could check with our clients before enabling, but could aim to make setting to something like 365 days a best practice.

@amcclain amcclain added the admin label Oct 5, 2022
@amcclain
Copy link
Member Author

We would also want to do some testing to ensure that an app that had a very large track table ran its deletes in some managed fashion after release. E.g. assuming the delete routine runs daily or every n hours on a timer, we could set a limit to how many logs could be deleted at once. It might then take a while for an app to "prune back" to its configured limit, but we would avoid a potential database/replication storm of some kind triggered by deleting 2m rows in one shot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant