mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Use single condition in the prometheus initializer file
This commit is contained in:
parent
6925e5598b
commit
cf5b414ae4
1 changed files with 2 additions and 5 deletions
|
|
@ -1,15 +1,12 @@
|
|||
# in config/initializers/prometheus.rb
|
||||
if Rails.env != "test"
|
||||
require 'prometheus_exporter/middleware'
|
||||
require 'prometheus_exporter/instrumentation'
|
||||
|
||||
# This reports stats per request like HTTP status and timings
|
||||
Rails.application.middleware.unshift PrometheusExporter::Middleware
|
||||
end
|
||||
|
||||
if Rails.env != "test"
|
||||
require 'prometheus_exporter/instrumentation'
|
||||
|
||||
# this reports basic process stats like RSS and GC info, type master
|
||||
# this reports basic process stats like RSS and GC info, type master
|
||||
# means it is instrumenting the master process
|
||||
PrometheusExporter::Instrumentation::Process.start(type: "master")
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue