You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it should be possible to get these tools working together with careful require order - require and initialize appsignal code first and then do the same with bugsnag.
Require appsignal first and then load bugsnag with disabled autoconfig:
# config/application.rbrequire"appsignal"# Let appsignal load all integrations and register rails initializersENV["BUGSNAG_DISABLE_AUTOCONFIGURE"]="1"require"bugsnag"Bugsnag.load_integration(:rails)Bugsnag.load_integration(:resque)
Load bugsnag's rake integration only after appsignal has finished patching rake.
Unfortunately the last step is not possible in current version on bugsnag (6.17.0) as rake integration it is treated differently from others like resque, sidekiq or mongo.
When running a rake task mentioned rake_tasks block is executed much sooner than initializers and that causes Rake::Task class to receive bugsnag's prepend module call before appsignal's alias method chain and that leads to stack level to deep exception mentioned in #577.
Please consider changing rake integration require logic to be more similar to others and users have more control when it is required.
The text was updated successfully, but these errors were encountered:
Hello!
I'm having troubles getting bugsnag to work in my Rails app together with APM tools (like AppSignal) that still uses alias method chains to hook into rake or other gems or frameworks. https://blog.newrelic.com/engineering/ruby-agent-module-prepend-alias-method-chains/ is a good article that explains the issue in detail.
I think it should be possible to get these tools working together with careful require order - require and initialize appsignal code first and then do the same with bugsnag.
These would be the steps:
Unfortunately the last step is not possible in current version on bugsnag (6.17.0) as rake integration it is treated differently from others like resque, sidekiq or mongo.
Instead of being required with load_integration method call (https://github.com/bugsnag/bugsnag-ruby/blob/v6.17.0/lib/bugsnag.rb#L215-L222) it is required in Rails
rake_tasks
block (https://github.com/bugsnag/bugsnag-ruby/blob/v6.17.0/lib/bugsnag/integrations/railtie.rb#L18).When running a rake task mentioned
rake_tasks
block is executed much sooner than initializers and that causes Rake::Task class to receive bugsnag's prepend module call before appsignal's alias method chain and that leads to stack level to deep exception mentioned in #577.Please consider changing rake integration require logic to be more similar to others and users have more control when it is required.
The text was updated successfully, but these errors were encountered: