- Notifications
You must be signed in to change notification settings - Fork928
fix(coderd): use insights for DAUs, simplify metricscache#12775
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix(coderd): use insights for DAUs, simplify metricscache#12775
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This stack of pull requests is managed by Graphite.Learn more about stacking. |
8770c0f
to2b3b5da
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Code deletion 🤤🤤🤤
This was an area I spotted as a rough patch in our code, very happy to see significant deletions here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
❤️
Uh oh!
There was an error while loading.Please reload this page.
This PR simplifies the DAU logic by relying on rolled up insights giving us great query performance and removing the need for caching each individual timezone.
For this fix, I opted not to refactor the WebUI requests to use
start_time=...&end_time=...
like template insights requests do. Instead I retrofitted this logic on the/daus
API endpoints using the TZ offset.I also opted to always return 60 days (2 months), just because the way this is used it doesn't make sense to return more.
In the future, we can request this data from
/insights/templates?section=interval&start_time=&end_time&interval=day
instead, this also takes care of the 60 days hardcoding.Fixes#12134
Fixeshttps://github.com/coder/customers/issues/384
Refs#12122