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

alertmetrics: process metrics calculation in background #2465

Merged
merged 17 commits into from
Jun 27, 2022

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Jun 23, 2022

Description:
This PR moves graph and CSV processing to a web worker, when supported.

  • alerts query limit increased to 1000
  • metrics page now goes back to up to 1 year, and the graph aggregation can be switched between daily, weekly, and monthly
  • a new useWorker hook can be used to process the result of a hook in a web worker, with graceful degradation
  • graph and table data now only extends to the start of the current interval*
  • a new worker.js file is now built for web workers

*Note: This means alerts from this week/month/day (dep. on current interval) will not be included in the graph or table since the counts and times wouldn't be a valid comparison since the final data point isn't complete. If the current month is June, then 1 year of data will display LAST June through May -- 12 full months, skipping the current partial month.

Closes #2436

Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally works as expected and code is readable.

@mastercactapus mastercactapus merged commit 27b6291 into master Jun 27, 2022
@mastercactapus mastercactapus deleted the metrics-worker branch June 27, 2022 17:00
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.

alert metrics: data parity
3 participants