Skip to content

fix(stats): Handle delta overflows in Counter and Countergauge #522

Merged
fwbrasil merged 4 commits intogetkyo:mainfrom
mobley-trent:fix-stats-overflow
Aug 2, 2024
Merged

fix(stats): Handle delta overflows in Counter and Countergauge #522
fwbrasil merged 4 commits intogetkyo:mainfrom
mobley-trent:fix-stats-overflow

Conversation

@mobley-trent
Copy link
Copy Markdown
Contributor

Closes #410
/claim #410

  • Handles overflow while calculating the delta in Counter and CounterGauge

@mobley-trent
Copy link
Copy Markdown
Contributor Author

@fwbrasil I think this takes care of the rollover

@mobley-trent mobley-trent marked this pull request as ready for review July 6, 2024 17:14
@hearnadam
Copy link
Copy Markdown
Collaborator

I think the issue was looking for a more holistic solution, but regardless tests will be necessary for this bounty claim.

@mobley-trent
Copy link
Copy Markdown
Contributor Author

Working on a better solution + tests

@mobley-trent
Copy link
Copy Markdown
Contributor Author

Hi @fwbrasil @hearnadam this solution addresses the overflow on last by rolling over the remainder of the value to start from zero. This would mitigate the inaccuracies when dealing with negative numbers. Kindly review and advise if this was not the intended behaviour

@mobley-trent
Copy link
Copy Markdown
Contributor Author

@fwbrasil @hearnadam I would appreciate your feedback

@fwbrasil
Copy link
Copy Markdown
Collaborator

fwbrasil commented Aug 2, 2024

Thank you! Sorry for the delay to review @mobley-trent

@fwbrasil fwbrasil merged commit 6c69c98 into getkyo:main Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stats: handle overflows

3 participants