module Evil::Metrics::Prometheus
Constants
- VERSION
Public Class Methods
push_gateway()
click to toggle source
# File lib/evil/metrics/prometheus.rb, line 16 def push_gateway @push_gateway ||= begin ::Prometheus::Client::Push.new( ENV.fetch("PROMETHEUS_JOB_NAME", "evil-metrics"), nil, ENV.fetch("PROMETHEUS_PUSH_GATEWAY", "http://localhost:9091"), ).tap do |gateway| http = gateway.instance_variable_get(:@http) http.open_timeout = 5 http.read_timeout = 5 end end end
registry()
click to toggle source
# File lib/evil/metrics/prometheus.rb, line 12 def registry ::Prometheus::Client.registry end