From aa3b1c5cd9c32666d555fe45f842c561080f6bc4 Mon Sep 17 00:00:00 2001 From: Toby Retallick Date: Wed, 9 Jan 2019 14:19:32 +0000 Subject: [PATCH] Access puma server metrics --- config/puma_prod.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/puma_prod.rb b/config/puma_prod.rb index 07c4592..8d4d3a9 100644 --- a/config/puma_prod.rb +++ b/config/puma_prod.rb @@ -15,8 +15,12 @@ ActiveRecord::Base.establish_connection end -after_fork do +after_worker_boot do require 'prometheus_exporter/instrumentation' + PrometheusExporter::Instrumentation::Puma.start +end +after_fork do + require 'prometheus_exporter/instrumentation' PrometheusExporter::Instrumentation::Process.start(type: 'web') end