yabeda-rb / yabeda-prometheus-mmap

Yabeda Prometheus exporter based on prometheus-client-mmap
MIT License
16 stars 6 forks source link

Missing Yabeda::Prometheus.push_gateway #5

Open ollym opened 2 years ago

ollym commented 2 years ago

Yabeda::Prometheus.push_gateway.add(Yabeda::Prometheus.registry) doesn't work with this gem

ollym commented 2 years ago

I got this to work:

  Prometheus::Client::Push.new(
    job: ENV.fetch('PROMETHEUS_JOB_NAME', 'yabeda'),
    gateway: ENV['PROMETHEUS_PUSH_GATEWAY'],
    open_timeout: 5,
    read_timeout: 5
  ).add(Yabeda::Prometheus::Mmap.registry)