mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
12 lines
484 B
Ruby
12 lines
484 B
Ruby
# 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
|
|
|
|
# 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
|