-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got empty response from metrics endpoint when starting server via bundle exec puma. #21
Comments
I also ran into this problem yesterday when setting up Yabeda w/the Puma and Prometheus plugins. |
The issue occurs when you try to start the puma server directly: What happens:
As a workaround, you can add |
Thanks a lot for your investigation, @zabolotnov87! I didn't even think about railtie, but now it seems to be pretty obvious 🤦 |
Are there updated instructions for this plugin when running puma directly with # ./config/initializers/yabeda.rb
# I actually found that I don't even need this file for the plugin to work...
require 'yabeda/railtie' # ./config/puma.rb
# ...
# ...
require 'yabeda/prometheus/mmap'
activate_control_app
plugin :yabeda
plugin :yabeda_prometheus
before_fork do # for puma cluster mode
Yabeda.configure!
end # Gemfile
# ... some other gems
gem 'yabeda'
gem 'yabeda-prometheus-mmap'
gem 'yabeda-puma-plugin'
# ... some other gems Is this setup expected? Doesn't look as straightforward as the docs make it seem. |
@chornbec I had the same issue in file, but in case it's optional require "yabeda/railtie"
require "yabeda/rails/railtie"
Yabeda::Rails.install!
Yabeda.configure! unless Yabeda.already_configured? and in puma.rb require "yabeda/prometheus" It helped me but i see empty page without metrics gems: gem "yabeda", "~> 0.13.1"
gem "yabeda-prometheus", "~> 0.9.1"
gem "yabeda-rails", "~> 0.9"
gem "yabeda-gc", "~> 0.4"
gem "yabeda-puma-plugin", "~> 0.7" |
Overview
Hello.
I use this gem integrating with rails. However,
bundle exec puma -C config/puma.rb
, I get empty response from metrics endpoint.bundle exec rails s
, I get valid response from metrics endpoint.This may be caused by the similar problem:
yabeda-rb/yabeda#15
Reproduce
I reproduced this problem in puma single worker mode, and exposing metrics on different port from puma.
The text was updated successfully, but these errors were encountered: