lib/syslogstash/prometheus_exporter.rb in syslogstash-1.2.0 vs lib/syslogstash/prometheus_exporter.rb in syslogstash-1.2.1

- old
+ new

@@ -1,7 +1,7 @@ -require 'prometheus/client/rack/exporter' require 'rack' +require 'prometheus/middleware/exporter' require 'rack/handler/webrick' require 'logger' class Syslogstash::PrometheusExporter attr_reader :thread @@ -42,10 +42,10 @@ end def run @thread = Thread.new do app = Rack::Builder.new - app.use Prometheus::Client::Rack::Exporter + app.use Prometheus::Middleware::Exporter app.run ->(env) { [404, {'Content-Type' => 'text/plain'}, ['Nope']] } logger = Logger.new($stderr) logger.level = Logger::INFO logger.formatter = proc { |s, t, p, m| "[Syslogstash::PrometheusExporter::WEBrick] #{m}\n" }