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

Defer agent initialization in Rails until after :load_config_initializers #1658

Commits on Dec 7, 2022

  1. Instrument ActionView on_load

    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.
    kaylareopelle committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    b5a3aed View commit details
    Browse the repository at this point in the history
  2. 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.
    kaylareopelle committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    29e749d View commit details
    Browse the repository at this point in the history
  3. Update instructions to work on multiple shells

    The previous instructions were not compatible with Zsh.
    These instructions work with Zsh and bash.
    kaylareopelle committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    e3171b4 View commit details
    Browse the repository at this point in the history
  4. Changelog entry

    kaylareopelle committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    bbd78a1 View commit details
    Browse the repository at this point in the history
  5. 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.
    kaylareopelle committed Dec 7, 2022
    Configuration menu
    Copy the full SHA
    1e989f1 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Update CHANGELOG entry

    kaylareopelle committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    7ccc3c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    832fc4f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    00e04a0 View commit details
    Browse the repository at this point in the history
  4. Update assertion

    kaylareopelle committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    d231f20 View commit details
    Browse the repository at this point in the history