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

Stats dashboard network capacity new day bug #721

Closed
1 task
baktun14 opened this issue Jan 26, 2025 · 3 comments · Fixed by #1094
Closed
1 task

Stats dashboard network capacity new day bug #721

baktun14 opened this issue Jan 26, 2025 · 3 comments · Fixed by #1094

Comments

@baktun14
Copy link
Contributor

baktun14 commented Jan 26, 2025

When a new day starts (0:00 UTC), there's a short period of time (~15m) where the stats show -100% for all the network capacity. It auto-fixes itself after that period when the provider snapshots are taken.

The reason for this is we do a query on day and join on the provider snapshots and when the new day starts, there's no provider snapshots that is flagged as isLastSuccessOfDay yet. Link to the query in question

This causes confusion for anyone looking at the dashboard in that period of time.

  • Return the previous day isLastSuccessOfDay provider snapshot when it's a new day and there's no provider snapshot yet.
@jzsfkzm
Copy link
Contributor

jzsfkzm commented Mar 23, 2025

Hi @baktun14, I sent a change regarding this, but have second thoughts about it. I observed the data returned for number of providers after midnight and found an interesting pattern. First it was 0, as you mentioned, then 7, then 36, finally the 72 one would expect (the same value as the previous day). 72 was to be seen around after 15 minutes after midnight.
So, my change (simply dropping the last value when it's 0) would not work here, because it cannot work with in-between, but still incorrect values (7 and 36 I mean).
However, there's already some code regarding this in the query you linked. I don't see what value this env var has in production. Maybe setting this to make a 15 minutes grace period would just simply solve this issue?
Need to be careful with this env var though, because the same env var is used in other queries as well.

@baktun14
Copy link
Contributor Author

@jzsfkzm Correct, it wouldn't solve the issue, and we don't want to touch the grace period var because it's used everywhere to determine the active status of providers. I think it can be done by changing the sql query directly or I guess instead of removing entries with 0 we can remove the ones 15 minutes after midnight utc?

jzsfkzm added a commit to jzsfkzm/console that referenced this issue Mar 26, 2025
@jzsfkzm
Copy link
Contributor

jzsfkzm commented Mar 26, 2025

@jzsfkzm Correct, it wouldn't solve the issue, and we don't want to touch the grace period var because it's used everywhere to determine the active status of providers. I think it can be done by changing the sql query directly or I guess instead of removing entries with 0 we can remove the ones 15 minutes after midnight utc?

I just changed the logic so for 15 minutes after midnight we ignore last stat item if that item is for the current day.

jzsfkzm added a commit to jzsfkzm/console that referenced this issue Mar 27, 2025
jzsfkzm added a commit to jzsfkzm/console that referenced this issue Mar 27, 2025
@github-project-automation github-project-automation bot moved this from Up Next (prioritized) to Released (in Prod) in Client Product and Engineering Roadmap Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released (in Prod)
Development

Successfully merging a pull request may close this issue.

2 participants