diff --git a/config/initializers/metrics.rb b/config/initializers/metrics.rb new file mode 100644 index 0000000..0bbab78 --- /dev/null +++ b/config/initializers/metrics.rb @@ -0,0 +1,7 @@ +unless Rails.env.test? + require 'prometheus_exporter/instrumentation' + require 'prometheus_exporter/middleware' + + PrometheusExporter::Instrumentation::Process.start(type: 'master') + Rails.application.middleware.unshift PrometheusExporter::Middleware +end