Skip to content
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

NoMethodError: undefined method `sidekiq_jobs_enqueued_total' for Yabeda:Module #10

Closed
inderps opened this issue Feb 28, 2020 · 7 comments
Assignees

Comments

@inderps
Copy link

inderps commented Feb 28, 2020

I'm running
'rails', '4.2.9'
sidekiq (5.2.7)

And I get following error

Bildschirmfoto 2020-02-28 um 16 12 31

@Envek
Copy link
Member

Envek commented Feb 28, 2020

Hi, @inderps. Are you using gem yabeda-rails or is there only gem "yabeda-sidekiq" in your Gemfile?

Please try to add gem "yabeda-rails" to your Gemfile. I believe that it should fix the error.

@inderps
Copy link
Author

inderps commented Feb 29, 2020

@Envek Thanks for your quick reply. Yes I discovered that to use yabeda-sidekiq, you need to add yabeda-rails as well. But by adding yabeda rails, will it also create metrics for web app? Because in our case, we were interested in sidekiq only.

@Envek
Copy link
Member

Envek commented Feb 29, 2020

If you don't want web metrics, you can just copy this railtie to your application: https://github.com/yabeda-rb/yabeda-rails/blob/master/lib/yabeda/rails/railtie.rb

I will add necessary configs and documentation later.

@Envek Envek self-assigned this Feb 29, 2020
@inderps
Copy link
Author

inderps commented Mar 2, 2020

Alright thanks

@hallelujah
Copy link

I think the simple fix would be to call:

Yabeda.configure! unless Yabeda.already_configured?

Like in https://github.com/yabeda-rb/yabeda-rails/blob/583b476e0a26ece08f3abefb1b423d5576837748/lib/yabeda/rails/railtie.rb#L18-L21

@inderps inderps closed this as completed Aug 14, 2020
@hallelujah
Copy link

@inderps why do you close the issue?

The gem does not work out of the box on standalone sidekiq.
It would be nice to have at least an instruction in the README

@Envek
Copy link
Member

Envek commented Aug 21, 2020

@inderps if you don't need rails metrics you can now upgrade to yabeda 0.8 and remove yabeda-rails gem: Yabeda will configure itself automatically.

For non-rails usage I added a note into README.

Envek added a commit to dsalahutdinov/yabeda-sidekiq that referenced this issue Apr 16, 2021
* master:
  Migrate from Travis CI to GitHub Actions for tests and releases
  0.7.0: Apply tags from `yabeda_tags` to all metrics inside a job
  Switch from current time to monotonic time for measuring job runtime
  Add basic specs
  Add Yabeda configuration instruction into README. Fixes yabeda-rb#10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants