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
fix: filter empty metrics before we collect last seen toggles. #2172
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
LG. Added a small suggestion.
|
||
if (this.config.flagResolver.isEnabled('batchMetrics')) { | ||
this.unsavedMetrics = collapseHourlyMetrics([ | ||
...this.unsavedMetrics, | ||
...clientMetrics, | ||
]); | ||
this.lastSeenService.updateLastSeen(clientMetrics); |
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.
Should this just be the default?
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.
I prefer to have it behind a flag, and the batch flag seems natural.
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
* fix: filter empty metrics before we collect last seen toggles. fixes: #2104 * fix: add a last-seen service to batch last-seen toggle updates Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
This PR fixes two things related to lastSeen details for feature toggles.
yes
orno
count is larger than 0.batchMetrics
. With the flag enabled lastSeen will only be updated every 30th second.fixes: #2104