Closed dorongutman closed 2 years ago
This is the old method patching problem. You can pick aliasing method chains or prepending modules. Start mixing them together and trouble starts happening.
Open to a PR that allows you to opt for a style of method patching as long as we keep the current default.
@SamSaffron I think this issue can be closed by same reason as https://github.com/discourse/prometheus_exporter/issues/159#issuecomment-1146203248
Style of method patching can be chosen now - https://github.com/discourse/prometheus_exporter#choosing-the-style-of-method-patching
Thanks @inner-whisper !
Ruby version: 2.7.1 Rails version: 6.0.4.4
I am cross posting this in the other gems repos as I don't know who/what is the culprit. When trying to run sidekiq with both prometheus exporter and datadog's sdk (
ddtrace
), sidekiq exits upon start (after a few seconds of waiting) with the following error:stack level too deep
Full traceback log:
This issue doesn't happen without the datadog gem or the prometheus gem.
I have created a reproduction repo with as little changes as possible compared to a fresh
rails new
installation - https://github.com/dorongutman/rails-sidekiq-datadog-prometheus-issueThe readme explains everything but in short:
For convenience, here are the two initializers: sidekiq.rb
prometheus.rb
Here's the full log from running sidekiq to its death (this specific run was with
RAILS_ENV=production
andDD_TRACE_ENABLED=false
to have fewer lines and potential issues but it happens in any combination):