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

reduce metrics collection frequency #98

Merged
merged 1 commit into from
Oct 20, 2023
Merged

reduce metrics collection frequency #98

merged 1 commit into from
Oct 20, 2023

Conversation

deepakduggirala
Copy link
Contributor

Description

Reduce metrics collection frequency

Related Issue(s)

Closes #95

Changes Made

List the main changes made in this PR. Be as specific as possible.

  • Feature added
  • Bug fixed
  • Code refactored
  • Documentation updated
  • Other changes: [describe]

cron config changed.

Deployment: pm2 restart

Checklist

Before submitting this PR, please make sure that:

  • Your code passes linting and coding style checks.
  • Documentation has been updated to reflect the changes.
  • You have reviewed your own code and resolved any merge conflicts.
  • You have requested a review from at least one team member.
  • Any relevant issue(s) have been linked to this PR.

Additional Information

Old metric data can be deleted with the following SQL

delete from metric where extract(hour from timestamp) != 21;

deletes all entries which are not made in 21st hour - only keeps one measurement per day taken during 21:00-21:59

@charlesbrandt
Copy link
Contributor

This seems like a great quick fix. We may want to revisit how we track metrics in the future (e.g. same db vs different db, timescale vs normal table, etc), but we can refer back to #95 to continue that discussion.

@charlesbrandt charlesbrandt merged commit fa63f61 into main Oct 20, 2023
@charlesbrandt charlesbrandt deleted the 95-metrics branch October 20, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Scheduled Script to Delete Metrics Older Than x Months
2 participants