Skip to content

Commit

Permalink
build: Excluded prometheus metrics from the testing environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrandahl committed Sep 3, 2024
1 parent a776956 commit 3f983e8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

require ::File.expand_path('config/environment', __dir__)

require 'prometheus/middleware/collector'
require 'prometheus/middleware/exporter'
unless Rails.env.test?
require 'prometheus/middleware/collector'
require 'prometheus/middleware/exporter'

use Prometheus::Middleware::Collector
use Prometheus::Middleware::Exporter
use Prometheus::Middleware::Collector
use Prometheus::Middleware::Exporter
end

map Rails.application.config.relative_url_root || '/' do
run Rails.application
Expand Down

0 comments on commit 3f983e8

Please sign in to comment.