Open mariokam opened 5 years ago
Try replacing default prometheus-client with prometheus-client-mmap:
# Gemfile
gem "yabeda"
gem "yabeda-rails"
gem "prometheus-client-mmap"
gem "yabeda-prometheus"
See https://github.com/yabeda-rb/yabeda-prometheus/issues/4 for discussion and more information
hey, @mariokam support of gitlab client moved to another gem https://github.com/yabeda-rb/yabeda-prometheus-mmap Try it out.
Ended up using yabeda-prometheus-mmap
too. Works great!
Unfortuantely this doesnt work currently with:
gem 'yabeda'
gem 'yabeda-rails'
gem 'yabeda-puma-plugin'
gem 'yabeda-prometheus-mmap'
Individual workers supply their own metrics (not aggregated)
That's weird. Can you please create reproduction? E.g. write a Ruby script using inline bundler and publish it as a secret gist? Also please show exact versions of all related gems – maybe some dependencies got updated…
Also, just to confirm that by “Individual workers” you mean forks of main Puma process that aren't synced (so you have single /metrics
endpoint that respond with metrics from different child worker process on every request). Because different Puma clusters on different machines/containers won't be synced – this is Prometheus' work to scrape each and aggregate.
I've solved this, it took a while but the answer was calling Prometheus client configure before fork
If you fail in that it's initialised after fork and multiple directories in /tmp created.
When running yabeda rails for clustered puma and does not work for streaming metrics, any ideas? We are running it via puma config
bundle exec puma -C config/puma.rb