yabeda-rb / yabeda-puma-plugin

Collects Puma web-server metrics from puma control panel
MIT License
72 stars 18 forks source link

For saving time of other developers #20

Closed buzjuka closed 2 years ago

Envek commented 3 years ago

Thank you for contribution!

I guess that you're not using Rails, right? Because for Ruby on Rails we have railtie that auto-configures Yabeda. What is your stack? Maybe we can add some auto-configuration logic for some other frameworks also.

buzjuka commented 3 years ago

Hi. Thanks for response) No) I'm using RoR. Maybe I missed some config lines or something else. But This is my environment

rails 5.2
puma 4.3.7
yabeda (0.11.0)

I have add these lines to my app

  # Gemfile.rb
  group :production, :staging do
    gem 'yabeda-puma-plugin'
    gem 'yabeda-prometheus-mmap'
  end
#config/puma.rb

activate_control_app
plugin :yabeda
plugin :yabeda_prometheus

And nothing. I have got blank response from metrics

After some research. I just add

# initializers/yabeda.rb
Yabeda.configure! if Rails.env.production? || Rails.env.staging?

Maybe this is bug related to using "single repo" pattern. I don't know.

But I think it could be helpfull for someone else)

Envek commented 3 years ago

That's really weird. It should be auto-configured. Thanks for providing details, I will take a look.

ollym commented 2 years ago

@Envek just to add, we had exactly the same issue. Rails 6.1 & Ruby 3.0

hanyueitaro commented 2 years ago

I had a similar problem. I created the issue. https://github.com/yabeda-rb/yabeda-puma-plugin/issues/21