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

Implement prepend instrumentation for Acts as Solr #581

Closed
tannalynn opened this issue Feb 22, 2021 · 1 comment
Closed

Implement prepend instrumentation for Acts as Solr #581

tannalynn opened this issue Feb 22, 2021 · 1 comment

Comments

@tannalynn
Copy link
Contributor

As part of implementing prepend auto-instrumentation for all libraries instrumented, introduce a prepend version of auto-instrumenting for the Acts as Solr gem

Feature Description

The agent instruments many libraries using the method chaining (a.k.a. method aliasing) approach to monkey-patching. This is a form of monkey-patching was deprecated with Ruby's introduction of :prepend as a means to insert additional functionality into a module's method lookup mechanism ahead of the library's original method implementation.
Prepend strategy will be the default choice in 7.0+. However, the prepend strategy may be reverted back to method chaining by adding the following configuration flag:

instrumentation:
  acts_as_solr: chain

All configuration options are described in-depth here:
If you find a conflict between Prepend and another gem in your application's Gemfile, we would highly appreciate opening an Issue or commenting on this one specific to this gem so that we are aware and potentially work with gem authors to eliminate conflicts.

Additional Context

We are switching to prepending by default and deprecating method-chaining as this is the most acceptable and dependable way to extend libraries with auto-instrumentation support outside of using the subscriber/notification hooks pattern that some gem authors already provide for observability purposes. However, this change is potentially a breaking change for some depending on other gems involved in an application's Gemfile makeup. To facilitate switching over to 7.0 release, the method chaining approach is only deprecated (not removed) and a configuration switch is provided to revert back to method-chaining for customers that are affected by prepend auto-instrumentation strategies.

@tannalynn tannalynn added this to the 7.0.0 Release Target milestone Feb 22, 2021
@tannalynn tannalynn added this to Triage in Ruby Engineering Board via automation Feb 22, 2021
@angelatan2 angelatan2 moved this from Triage to Backlog in Ruby Engineering Board Feb 23, 2021
@angelatan2 angelatan2 moved this from Backlog to To do in Ruby Engineering Board Feb 27, 2021
@tannalynn
Copy link
Contributor Author

Our research has shown this gem is not commonly used by our users at this time. ActsAsSolr instrumentation will be left as is and not converted to prepend.

Ruby Engineering Board automation moved this from To do to Done/Pending Release Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Ruby Engineering Board
  
Code Complete/Done
Development

No branches or pull requests

1 participant