-
Notifications
You must be signed in to change notification settings - Fork 375
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
[PROF-5774] Remove support for profiling Ruby 2.1 #2140
[PROF-5774] Remove support for profiling Ruby 2.1 #2140
Conversation
@@ -242,6 +247,15 @@ def self.pkg_config_missing?(command: $PKGCONFIG) # rubocop:disable Style/Global | |||
architecture_not_supported unless RUBY_PLATFORM.start_with?('x86_64', 'aarch64') | |||
end | |||
|
|||
private_class_method def self.on_ruby_2_1? | |||
ruby_version_not_supported = explain_issue( | |||
'your Ruby version (2.1) is too old to be supported.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the message is a bit negative, specially for clients that are not happy to be stuck on 2.1 themselves.
How about something like "the profiler only supports Ruby 2.2 or newer".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, changed in 91eb862 .
@@ -148,6 +149,10 @@ def self.pkg_config_missing?(command: $PKGCONFIG) # rubocop:disable Style/Global | |||
"Get in touch with us if you're interested in profiling your app!" | |||
].freeze | |||
|
|||
UPGRADE_RUBY = [ | |||
'Upgrade to a modern Ruby to enable profiling for your app.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Upgrade to Ruby 2.2 or newer" is more accurate than modern Ruby.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I think that may be a bit redundant? We always present the two parts of the error message together, e.g. at installation (which is hidden by default by rubygems):
+------------------------------------------------------------------------------+
| Could not compile the Datadog Continuous Profiler because |
| the profiler only supports Ruby 2.2 or newer. |
| |
| The Datadog Continuous Profiler will not be available, |
| but all other ddtrace features will work fine! |
| |
| Upgrade to a modern Ruby to enable profiling for your app. |
+------------------------------------------------------------------------------+
and at run-time:
W, [2022-07-11T09:09:22.971998 #20866] WARN -- ddtrace: [ddtrace] Profiling was requested but is not supported, profiling disabled: Your ddtrace installation is missing support for the Continuous Profiler because the profiler only supports Ruby 2.2 or newer. Upgrade to a modern Ruby to enable profiling for your app
So do you think now that I've changed the first part to already state customers need 2.2+, is it worth repeating it again on the second part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reads fine now! 👍
Update: dd-trace-rb 1.2.0 is out, so this is ready for review. I've noticed there's a conflict because of #2061; I'll push a rebase ASAP to clear it up. |
This is the first piece of dropping profiling support for Ruby 2.1. Instead of the extension building, customers will get the following message: ``` +------------------------------------------------------------------------------+ | Could not compile the Datadog Continuous Profiler because | | your Ruby version (2.1) is too old to be supported. | | | | The Datadog Continuous Profiler will not be available, | | but all other ddtrace features will work fine! | | | | Upgrade to a modern Ruby to enable profiling for your app. | +------------------------------------------------------------------------------+ ``` (Note that, as the message says, other dd-trace-rb features are untouched and will still work).
…ative extension Less weird exceptions to maintain, yay!
Message is now going to be > Could not compile the Datadog Continuous Profiler because > the profiler only supports Ruby 2.2 or newer. at installation time, and > Your ddtrace installation is missing support for the Continuous > Profiler because the profiler only supports Ruby 2.2 or newer.
91eb862
to
cf2330a
Compare
Update: Thanks Tony and Marco. I've rebased to solve the conflicts (related to libddprof -> libdatatadog renaming). Going to press the magic button! |
We've dropped support for Ruby 2.1 some time ago (<DataDog/dd-trace-rb#2140>) and I spotted that the documentation was outdated.
**What does this PR do?**: This PR removes support for profiling Ruby 2.2 using the Continuous Profiling product. Other products shipped in ddtrace (tracing, application security monitoring, CI, etc) are unaffected. This dropping of support does not impact our customer's ability to install the latest dd-trace-rb on Ruby 2.2. What it does is 1. Skip compilation of the profiling native extension on Ruby 2.2 2. Print a warning message when customers try to enable profiling on Ruby 2.2 (but does not otherwise block or break their application) The warning message shown to customers is: > W, [2023-02-01T11:42:57.022293 #410738] WARN -- ddtrace: [ddtrace] > Profiling was requested but is not supported, profiling disabled: > Your ddtrace installation is missing support for the Continuous > Profiler because the profiler only supports Ruby 2.3 or newer. > Upgrade to a modern Ruby to enable profiling for your app. Customers are welcome to continue using older versions of dd-trace-rb to profile their Ruby 2.2 (as well as 2.1) applications. (This PR is similar to #2140 where we dropped support for Ruby 2.1) **Motivation**: There is little customer interest on profiling Ruby 2.2, and supporting old Rubies also comes with an extra tax -- just look how much code and complexity is being removed by this PR. **Additional Notes**: (N/A) **How to test the change?**: * Validate that test suite still runs successfully on Ruby 2.2 * Validate that you get the above error message when trying to profile a Ruby 2.2 application
**What does this PR do?**: This PR removes support for profiling Ruby 2.2 using the Continuous Profiling product. Other products shipped in ddtrace (tracing, application security monitoring, CI, etc) are unaffected. This dropping of support does not impact our customer's ability to install the latest dd-trace-rb on Ruby 2.2. What it does is 1. Skip compilation of the profiling native extension on Ruby 2.2 2. Print a warning message when customers try to enable profiling on Ruby 2.2 (but does not otherwise block or break their application) The warning message shown to customers is: > W, [2023-02-01T11:42:57.022293 #410738] WARN -- ddtrace: [ddtrace] > Profiling was requested but is not supported, profiling disabled: > Your ddtrace installation is missing support for the Continuous > Profiler because the profiler only supports Ruby 2.3 or newer. > Upgrade to a modern Ruby to enable profiling for your app. Customers are welcome to continue using older versions of dd-trace-rb to profile their Ruby 2.2 (as well as 2.1) applications. (This PR is similar to #2140 where we dropped support for Ruby 2.1) **Motivation**: There is little customer interest on profiling Ruby 2.2, and supporting old Rubies also comes with an extra tax -- just look how much code and complexity is being removed by this PR. **Additional Notes**: (N/A) **How to test the change?**: * Validate that test suite still runs successfully on Ruby 2.2 * Validate that you get the above error message when trying to profile a Ruby 2.2 application
What does this PR do?
This PR removes support for profiling Ruby 2.1 using the Continuous Profiling product. Other products shipped in ddtrace (tracing, application security monitoring, CI, etc) are unaffected.
This dropping of support does not impact our customer's ability to install the latest dd-trace-rb on Ruby 2.1. What it does is
The warning message shown to customers is:
Motivation
There is little customer interest on profiling Ruby 2.1, and supporting old Rubies also comes with an extra tax, especially as we build towards the new native profiler.
Additional Notes
I'm opening this PR as a draft not because it's missing anything, but because it MUST only be merged after dd-trace-rb 1.2.0 is released.
How to test the change?