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
As part of implementing prepend auto-instrumentation for all libraries instrumented, introduce a prepend version of auto-instrumenting for the bunny 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:
bunny: chain
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 the bunny 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.
The text was updated successfully, but these errors were encountered:
As part of implementing prepend auto-instrumentation for all libraries instrumented, introduce a prepend version of auto-instrumenting for the bunny 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:
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 the bunny 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.The text was updated successfully, but these errors were encountered: