puma-plugin-statsd
puma-plugin-statsd copied to clipboard
Negative requests count metric on server shutdown
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.
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 :man_shrugging: