Sha256: 6e89f57926fe4630de092a85c1468bb39047e74e8d171d67219634ae31d43271

Contents?: true

Size: 455 Bytes

Versions: 5

Compression:

Stored size: 455 Bytes

Contents

module GovukPrometheusExporter
  def self.configure
    unless Rails.env == "test" || (ENV["GOVUK_PROMETHEUS_EXPORTER"]) != "true"
      require "prometheus_exporter"
      require "prometheus_exporter/server"
      require "prometheus_exporter/middleware"

      server = PrometheusExporter::Server::WebServer.new bind: "0.0.0.0", port: 9394
      server.start

      Rails.application.middleware.unshift PrometheusExporter::Middleware
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
govuk_app_config-4.6.3 lib/govuk_app_config/govuk_prometheus_exporter.rb
govuk_app_config-4.6.2 lib/govuk_app_config/govuk_prometheus_exporter.rb
govuk_app_config-4.6.1 lib/govuk_app_config/govuk_prometheus_exporter.rb
govuk_app_config-4.6.0 lib/govuk_app_config/govuk_prometheus_exporter.rb
govuk_app_config-4.5.0 lib/govuk_app_config/govuk_prometheus_exporter.rb