Module: Yabeda::Prometheus

Defined in:
lib/yabeda/prometheus.rb,
lib/yabeda/prometheus/version.rb,
lib/yabeda/prometheus/exporter.rb

Defined Under Namespace

Classes: Adapter, Exporter

Constant Summary collapse

VERSION =
"0.9.1"

Class Method Summary collapse

Class Method Details

.push_gatewayObject



17
18
19
20
21
22
23
24
# File 'lib/yabeda/prometheus.rb', line 17

def push_gateway
  @push_gateway ||=
    ::Prometheus::Client::Push.new(
      job: ENV.fetch("PROMETHEUS_JOB_NAME", "yabeda"),
      gateway: ENV.fetch("PROMETHEUS_PUSH_GATEWAY", "http://localhost:9091"),
      open_timeout: 5, read_timeout: 30,
    )
end

.registryObject



13
14
15
# File 'lib/yabeda/prometheus.rb', line 13

def registry
  ::Prometheus::Client.registry
end