yabeda-rb/yabeda-anycable

Errors from Yabeda in environment where we do not run Yabeda.configure!

Closed this issue · 1 comments

In our test environment, we do not want to collect metrics so we intentionally do not run Yabeda.configure!. However, we get errors from Yabeda because it is still in the middleware chain. It looks like here Yabeda is added to the middleware chain before configure. There needs to be a way to add the gem but also not run Yabeda in a specified environment.

Envek commented

Postponed middleware insertion until Yabeda is configured and released in v0.1.1, enjoy!

Quick smoke test shows that AnyCable RPC process is fine with that: metrics are being collected and exposed.

Please also note that yabeda-sidekiq most probably will also need the same change if you're using it as it also injects middlewares to Sidekiq before Yabeda is configured, outside of Yabeda.configure block. (I need to test whether Sidekiq works if middlewares inserted late).