-
Notifications
You must be signed in to change notification settings - Fork 599
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
Defer agent initialization in Rails until after :load_config_initializers #1658
Merged
kaylareopelle
merged 9 commits into
dev
from
bugfix/rails-frameworks-forced-to-load-during-agent-initialization
Dec 8, 2022
Merged
Defer agent initialization in Rails until after :load_config_initializers #1658
kaylareopelle
merged 9 commits into
dev
from
bugfix/rails-frameworks-forced-to-load-during-agent-initialization
Dec 8, 2022
Commits on Dec 7, 2022
-
Previously, ActionView was forced to load by the agent before ActiveSupport loaded its code, causing any application-defined initializers related to ActionView to be ignored. Subscribing after ActiveSupport loads ActionView resolves the problem.
Configuration menu - View commit details
-
Copy full SHA for b5a3aed - Browse repository at this point
Copy the full SHA b5a3aedView commit details -
Split agent startup for Rails into two initializers
The central argument around loading the agent before other initializers is to allow initializers to reference the add_method_tracer API. Including the modules before other initializers are run allows this to happen. If the second initializer doesn't specify when it should be run, it will run immediately after our first initializer. By specifying after: :load_config_initializers, the agent will not execute init_plugin until after initializers defined in config/initializers are run. This stops the agent from forcing ActiveRecord to load before customer-defined initializers.
Configuration menu - View commit details
-
Copy full SHA for 29e749d - Browse repository at this point
Copy the full SHA 29e749dView commit details -
Update instructions to work on multiple shells
The previous instructions were not compatible with Zsh. These instructions work with Zsh and bash.
Configuration menu - View commit details
-
Copy full SHA for e3171b4 - Browse repository at this point
Copy the full SHA e3171b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for bbd78a1 - Browse repository at this point
Copy the full SHA bbd78a1View commit details -
Add config to determine Rails initialization order
Starting the agent after :load_config_initializers prevents the dynamic initializer for roadie-rails from running, making the gem moot. The customer who used the bugfix also had an error pop up with one of their initializers. Though this change solves the problem with configs getting applied, it may interact unpredictably with existing initializers. We won't turn on this behavior by default until a major version release.
Configuration menu - View commit details
-
Copy full SHA for 1e989f1 - Browse repository at this point
Copy the full SHA 1e989f1View commit details
Commits on Dec 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7ccc3c5 - Browse repository at this point
Copy the full SHA 7ccc3c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 832fc4f - Browse repository at this point
Copy the full SHA 832fc4fView commit details -
Merge branch 'dev' into bugfix/rails-frameworks-forced-to-load-during…
…-agent-initialization
Configuration menu - View commit details
-
Copy full SHA for 00e04a0 - Browse repository at this point
Copy the full SHA 00e04a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d231f20 - Browse repository at this point
Copy the full SHA d231f20View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.