puma: add Prometheus metrics exporter.
To test it, run `bin/rails server` then do `curl http://localhost:9393`. https://github.com/harmjanblok/puma-metrics
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
# * PUMA_WORKER_TIMEOUT
|
||||
# * PUMA_PIDFILE
|
||||
# * PUMA_CONTROL_URL
|
||||
# * PUMA_METRICS_URL
|
||||
#
|
||||
# Use `bin/pumactl` to control a running Puma instance.
|
||||
#
|
||||
@@ -84,6 +85,13 @@ end
|
||||
# Allow puma to be restarted by `rails restart` command.
|
||||
plugin :tmp_restart
|
||||
|
||||
# Enable Prometheus metrics.
|
||||
# https://github.com/harmjanblok/puma-metrics
|
||||
plugin :metrics
|
||||
|
||||
# Export Prometheus metrics by default on http://localhost:9393
|
||||
metrics_url ENV.fetch("PUMA_METRICS_URL", "tcp://localhost:9393")
|
||||
|
||||
# Start the Puma control rack application on +url+. This application can
|
||||
# be communicated with to control the main server. Additionally, you can
|
||||
# provide an authentication token, so all requests to the control server
|
||||
|
||||
Reference in New Issue
Block a user