newrelic-ruby-agent icon indicating copy to clipboard operation
newrelic-ruby-agent copied to clipboard

Update boot/strap to remove customer supplied agent instances and ensure the latest NR supplied one is in play

Open fallwith opened this issue 1 year ago • 1 comments

When the APM k8s operator work was originally conducted, a conservative approach was deliberately taken to avoid colliding / clobbering any existing customer solution in play. Since then, we have received sufficient feedback encouraging us to go ahead and take ownership of any NR specific aspects of the tech stack and upgrade the APM agent to the latest k8s operator compatible version available on the container disk volume.

To align with this initiative for the Ruby agent, we need to overhaul the boot/strap system to proactively remove any instance of newrelic_rpm from the customer app supplied Bundler groups before continuing to introduce the disk volume based instance of the agent to the stack.

Presumably this can be accomplished by altering the patch of Bundler::Runtime's require method to modify the groups input arguments prior to invoking super.

Definition of done:

  • The boot/strap system has been updated
  • We have test driven confidence in the following scenarios:
    • No customer-supplied newrelic_rpm present
    • Customer-supplied newrelic_rpm present
  • Both scenarios should confirm that the agent successfully instruments customer-supplied gems

fallwith avatar Oct 03 '24 21:10 fallwith

https://new-relic.atlassian.net/browse/NR-322215