-
Notifications
You must be signed in to change notification settings - Fork 90
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
Initial commit for adding prepend in addition to alias_method #448
Conversation
Any timeline to get this merged? It seems to affect quite a lot of updated Rails app. |
We’ve been holding off on updating Scout for a year because of this issue. It’s also blocking us from updating to Ruby 3.1 because the old Scout gem isn’t compatible with the new YAML parser that’s safe by default, which disables references. |
Is there any update on this? I have Scout + Sentry in my Gemfile. I installed Flipper and it caused stack level too deep errors on all Net::HTTP requests. From what I can tell, the entire problem is that Flipper requires net/http. I had a similar problem with Logtail a few months ago. That one requires net/https. So when a gem requires net/http(s) before scout, bad things happen. Prepending seems to be the solution here. This will Stack Level Too Deep during a Net::HTTP call gem 'flipper'
gem 'flipper-active_record'
gem 'flipper-ui'
gem 'scout_apm'
gem 'sentry-ruby'
gem 'sentry-rails'
gem 'sentry-sidekiq' This works fine gem 'scout_apm'
gem 'sentry-ruby'
gem 'sentry-rails'
gem 'sentry-sidekiq'
gem 'flipper'
gem 'flipper-active_record'
gem 'flipper-ui' |
Is Ruby not a priority for Scout anymore? It's amazing that this has been ready for review for 2 months and nothing has happened since then. I appreciate your work on this @dlanderson but I have to say that the timeline of this issue has me questioning Scout's commitment to Ruby. |
@dlanderson Do you have an ETA for this release? It sounded like you were hopeful to get this out late-June. Like others here our company uses both Scout and Airbrake - we are unable to upgrade due to the incompatibility between the two, so unless this is resolved soon we will be forced to pick a single service to move forward with. That's not an appealing option for us. Anything you can do to move this forward in a timely fashion is appreciated - thanks! |
Yeah, this is a pretty brutal bug. It's pretty disheartening to see that the fix has been sitting here for 3 months. It really does feel like Ruby isn't important to Scout. |
Hi all - Apologies for the delay. I had wanted to get more of the instrumentation set for prepend option with updated tests and clearly I haven't been able to get to it as soon as I wanted. I do have most of the instruments ready with prepend available, and I am planning to release a new major version next week. The current (not ideal), workaround is to make sure
|
Thank you @dlanderson! Have a great weekend. |
Forgot to mention - I'll release the new gem to RubyGems on Monday. Thanks for your patience, all! |
For many of our instruments, we still use
Module#alias_method
to monkeypatch specific methods to gather telemetry. The more modern approach is to useModule#prepend
, which many other gems now use as default.Moving from
alias_method
toprepend
has caused major headaches for nearly all gems which made the switch, despite making the change in a major version semantic version bump. In order to allow a less disruptive upgrade path, Scout will continue to usealias_method
as the default, but with available configuration option to move either all instrumentation toprepend
, or selectively move instrumentation toprepend
.We will consider making the
prepend
instrumentation default after this configurable option has been released for a sufficient amount of time.This is the initial draft PR starting with the NetHTTP instrumentation (there's still some duplicate instrumentation code for NetHTTP). We'll need to do the same for all of the other instruments.
Resolves #404
Resolves #309
Resolves #114
Replaces PR #402