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
The Apartment gem helps Rails applications achieve database multitenancy. There is a known incompatiability with New Relic and Apartment when the config setting active_record_log = true is present. This config unsubscribes from ActiveRecord notifications, which Ruby agent instrumentation relies on. We are unable to provide insights into ActiveRecord calls when that config setting is enabled, which it isn't by default.
config.after_initializedo# NOTE: Load the custom log subscriber if enabledifApartment.active_record_logActiveSupport::Notifications.notifier.listeners_for('sql.active_record').eachdo |listener|
nextunlesslistener.instance_variable_get('@delegate').is_a?(ActiveRecord::LogSubscriber)ActiveSupport::Notifications.unsubscribelistenerendApartment::LogSubscriber.attach_to:active_recordendend
Customers can disable this configuration value and recieve New Relic insights into their database calls.
Acceptance Criteria
We should understand why this configuration setting needs to disable ActiveRecord notifications, and from there decide if we add our findings to a troubleshooting guide that instructs turning off this config setting for New Relic to report database calls, or programatically work around this issue in the agent.
Post-completion
The GTSE team created a KCS article describing the fix of removing the config. Whatever we decided to do with this ticket, we should update teh GTSE team so they can edit that article if needed.
The text was updated successfully, but these errors were encountered:
Description
The Apartment gem helps Rails applications achieve database multitenancy. There is a known incompatiability with New Relic and Apartment when the config setting
active_record_log = true
is present. This config unsubscribes from ActiveRecord notifications, which Ruby agent instrumentation relies on. We are unable to provide insights into ActiveRecord calls when that config setting is enabled, which it isn't by default.Customers can disable this configuration value and recieve New Relic insights into their database calls.
Acceptance Criteria
We should understand why this configuration setting needs to disable ActiveRecord notifications, and from there decide if we add our findings to a troubleshooting guide that instructs turning off this config setting for New Relic to report database calls, or programatically work around this issue in the agent.
Post-completion
The GTSE team created a KCS article describing the fix of removing the config. Whatever we decided to do with this ticket, we should update teh GTSE team so they can edit that article if needed.
The text was updated successfully, but these errors were encountered: