Puma integration with dogstatsd for easy tracking of key metrics that puma can provide:
- puma.workers
- puma.booted_workers
- puma.running
- puma.backlog
- puma.pool_capacity
- puma.max_threads
Add this gem to your Gemfile with puma and then bundle:
gem "puma"
gem "puma-plugin-dogstatsd"
Add it to your puma config:
# config/puma.rb
require 'puma/plugin/PumaPluginDogstastd'
bind "http://127.0.0.1:9292"
workers 1
threads 8, 16
PumaPluginDogstastd.activate(self, an_instance_of_a_dogstatsd_client)
This gem is a fork of the excellent puma-plugin-statsd by James Healy.
Other puma plugins that were helpful references:
The puma docs were also helpful.
The gem is available as open source under the terms of the MIT License.