harmjanblok / puma-metrics

Puma plugin to export puma stats as prometheus metrics
MIT License
94 stars 27 forks source link

shut down in on_stopped so metrics server is running whenever puma is #31

Closed jasquat closed 2 years ago

jasquat commented 2 years ago

Shut down metrics server in on_stopped so it only stops when main puma process stops and ignores when workers are stopped. This allows us to maintain a running metrics server when workers restart or crash.

To replicate issue, start up puma server with multiple workers, kill one of the workers, and notice that the metrics endpoint no longer works.

harmjanblok commented 2 years ago

@jasquat thanks for your contribution, this is included in version 1.2.4, which has been pushed to master.