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

Negative requests count metric on server shutdown #62

Open
tjvc opened this issue Nov 27, 2024 · 1 comment
Open

Negative requests count metric on server shutdown #62

tjvc opened this issue Nov 27, 2024 · 1 comment

Comments

@tjvc
Copy link

tjvc commented Nov 27, 2024

We're seeing this plugin report a negative requests count metric just before Puma (in our case in a Kubernetes pod) shuts down. I'm assuming that the counters are cleared at some point during the shutdown process (or perhaps the workers shut down before the master process) and that when we calculate the request count we end up subtracting from zero.

Would you accept a patch that ensures that requests count never returns less than zero? Happy to submit a PR if so.

@yob
Copy link
Owner

yob commented Dec 2, 2024

Yup, I'd accept a PR for this!

It feels a shame to not just pass through whatever puma says the stats are, but also non-zero request count seems .... not ideal 🤷‍♂️

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

No branches or pull requests

2 participants