Skip to content

Commit 0ef7854

Browse files
authored
UI3 - Try making puma metrics work by probing in puma workers (#12248)
Testing #12238 in a non prod environment (i.e. UI3) Follow instructions in https://docs.appsignal.com/ruby/integrations/puma.html#usage-with-preload_app
1 parent 66d684f commit 0ef7854

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

config/puma.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@
5151
require_relative "../app/lib/credentials"
5252

5353
Credentials.load if ENV["DOPPLER_TOKEN"]
54+
55+
# https://docs.appsignal.com/ruby/integrations/puma.html#usage-with-preload_app
56+
# Add this before_fork callback to stop the minutely probes in the Puma main process
57+
before_fork do
58+
Appsignal::Probes.stop
59+
end
60+
61+
# Add this on_worker_boot callback to start the minutely probes in the Puma worker processes
62+
on_worker_boot do
63+
Appsignal::Probes.start
64+
end

0 commit comments

Comments
 (0)