Introduce yabeda for puma metrics

This commit is contained in:
Mike Dalessio
2025-09-15 12:08:43 -04:00
parent ad1491a484
commit f01e20f64b
4 changed files with 31 additions and 1 deletions
+16
View File
@@ -22,3 +22,19 @@ plugin :tmp_restart
# Run Solid Queue with Puma
plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
if ENV.fetch("PREFORK") { !Rails.env.local? }
on_worker_boot do
Yabeda::ActiveRecord.start_timed_metric_collection_task
Hey.deployment.start_timed_report_host_refresh
end
# Expose prometheus metrics on port 9394
activate_control_app
plugin :yabeda
plugin :yabeda_prometheus
before_fork do
Process.warmup
end
end