Skip to content

Commit 717f1c3

Browse files
feat!: Drop Support for EoL Rails 6.1 (#1231)
* feat!: Drop Support for EoL Rails 6.1 This change removes support for Rails 6.1, which has reached EoL. Users must pin to previous versions of gems and will no longer receive features or bug fixes for instrumentations earlier than this release Fixes #1223 * squash: add missing dependency * squash: user newer AR versions * squash: remove post install warning * squash: load logger * squash: rubocop fix
1 parent b840de9 commit 717f1c3

File tree

24 files changed

+24
-44
lines changed

24 files changed

+24
-44
lines changed

POST_INSTALL_MESSAGE

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
Ruby 3.0 has reached EoL 2024-04-23. OTel Ruby Contrib gems will no longer accept new features or bug fixes for Ruby 3.0 after 2025-01-15. Please upgrade to Ruby 3.1 or higher to continue receiving updates.
2-
3-
Rails 6.1 has reached EoL 2024-10-01. OTel Ruby Contrib gems will no longer accept new features or bug fixes for Rails 6.1 after 2025-01-15. Please upgrade to Rails 7.0 or higher to continue receiving updates.

instrumentation/action_mailer/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "action_mailer-#{version}" do
99
gem 'rails', "~> #{version}"
1010
end

instrumentation/action_mailer/lib/opentelemetry/instrumentation/action_mailer/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module ActionMailer
5555
# })
5656
# end
5757
class Instrumentation < OpenTelemetry::Instrumentation::Base
58-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
58+
MINIMUM_VERSION = Gem::Version.new('7')
5959
EMAIL_ATTRIBUTE = %w[email.to.address email.from.address email.cc.address email.bcc.address].freeze
6060

6161
install do |_config|

instrumentation/action_pack/Appraisals

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
8-
appraise "rails-#{version}" do
7+
%w[7.0.0 7.1.0].each do |version|
8+
appraise "action_pack-#{version}" do
99
gem 'rails', "~> #{version}"
1010
end
1111
end
1212

1313
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
1414
%w[7.2.0].each do |version|
15-
appraise "rails-#{version}" do
15+
appraise "action_pack-#{version}" do
1616
gem 'rails', "~> #{version}"
1717
end
1818
end
1919

20-
appraise 'rails-latest' do
20+
appraise 'action_pack-latest' do
2121
gem 'rails'
2222
end
2323
end

instrumentation/action_pack/lib/opentelemetry/instrumentation/action_pack/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module ActionPack
3333
# })
3434
# end
3535
class Instrumentation < OpenTelemetry::Instrumentation::Base
36-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
36+
MINIMUM_VERSION = Gem::Version.new('7')
3737

3838
install do |_config|
3939
require_railtie

instrumentation/action_view/Appraisals

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "action_view-#{version}" do
99
gem 'rails', "~> #{version}"
1010
end
1111
end
1212

1313
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
1414
%w[7.2.0].each do |version|
15-
appraise "rails-#{version}" do
15+
appraise "action_view-#{version}" do
1616
gem 'rails', "~> #{version}"
1717
end
1818
end
1919

20-
appraise 'rails-latest' do
20+
appraise 'action_view-latest' do
2121
gem 'rails'
2222
end
2323
end

instrumentation/action_view/lib/opentelemetry/instrumentation/action_view/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module ActionView
4444
# })
4545
# end
4646
class Instrumentation < OpenTelemetry::Instrumentation::Base
47-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
47+
MINIMUM_VERSION = Gem::Version.new('7')
4848
install do |_config|
4949
require_dependencies
5050
end

instrumentation/active_job/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "activejob-#{version}" do
99
gem 'activejob', "~> #{version}"
1010
end

instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Instrumentation
99
module ActiveJob
1010
# The Instrumentation class contains logic to detect and install the ActiveJob instrumentation
1111
class Instrumentation < OpenTelemetry::Instrumentation::Base
12-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
12+
MINIMUM_VERSION = Gem::Version.new('7')
1313

1414
install do |_config|
1515
require_dependencies

instrumentation/active_job/opentelemetry-instrumentation-active_job.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'
3030

31-
spec.add_development_dependency 'activejob', '>= 6.1'
3231
spec.add_development_dependency 'appraisal', '~> 2.5'
3332
spec.add_development_dependency 'bundler', '~> 2.4'
3433
spec.add_development_dependency 'minitest', '~> 5.0'

instrumentation/active_job/test/opentelemetry/instrumentation/active_job/handlers/perform_test.rb

-15
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,7 @@
6868
_(process_span.events.first.attributes['exception.message']).must_equal 'This job raises an exception'
6969
end
7070

71-
it 'captures errors that were handled by rescue_from in versions earlier than Rails 7' do
72-
skip 'rescue_from jobs behave differently in Rails 7 and newer' if ActiveJob.version >= Gem::Version.new('7')
73-
RescueFromJob.perform_later
74-
75-
_(process_span.status.code).must_equal OpenTelemetry::Trace::Status::ERROR
76-
_(process_span.status.description).must_equal 'Unexpected ActiveJob Error RescueFromJob::RescueFromError'
77-
78-
_(process_span.events.first.name).must_equal 'exception'
79-
_(process_span.events.first.attributes['exception.type']).must_equal 'RescueFromJob::RescueFromError'
80-
_(process_span.events.first.attributes['exception.message']).must_equal 'I was handled by rescue_from'
81-
end
82-
8371
it 'ignores errors that were handled by rescue_from in versions of Rails 7 or newer' do
84-
skip 'rescue_from jobs behave differently in Rails 7 and newer' if ActiveJob.version < Gem::Version.new('7')
8572
RescueFromJob.perform_later
8673

8774
_(process_span.status.code).must_equal OpenTelemetry::Trace::Status::OK
@@ -318,15 +305,13 @@
318305

319306
describe 'active_job callbacks' do
320307
it 'makes the tracing context available in before_perform callbacks' do
321-
skip "ActiveJob #{ActiveJob.version} subscribers do not include timing information for callbacks" if ActiveJob.version < Gem::Version.new('7')
322308
CallbacksJob.perform_now
323309

324310
_(CallbacksJob.context_before).wont_be_nil
325311
_(CallbacksJob.context_before).must_be :valid?
326312
end
327313

328314
it 'makes the tracing context available in after_perform callbacks' do
329-
skip "ActiveJob #{ActiveJob.version} subscribers do not include timing information for callbacks" if ActiveJob.version < Gem::Version.new('7')
330315
CallbacksJob.perform_now
331316

332317
_(CallbacksJob.context_after).wont_be_nil

instrumentation/active_record/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "activerecord-#{version}" do
99
gem 'sqlite3', '~> 1.4'
1010
gem 'activerecord', "~> #{version}"

instrumentation/active_record/lib/opentelemetry/instrumentation/active_record/instrumentation.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Instrumentation
99
module ActiveRecord
1010
# The Instrumentation class contains logic to detect and install the ActiveRecord instrumentation
1111
class Instrumentation < OpenTelemetry::Instrumentation::Base
12-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
12+
MINIMUM_VERSION = Gem::Version.new('7')
1313

1414
install do |_config|
1515
require_dependencies
@@ -45,7 +45,7 @@ def patch_activerecord
4545
::ActiveSupport.on_load(:active_record) do
4646
# Modules to prepend to ActiveRecord::Base are grouped by the source
4747
# module that they are defined in as they are included into ActiveRecord::Base
48-
# Example: Patches::PersistenceClassMethods refers to https://github.com/rails/rails/blob/v6.1.0/activerecord/lib/active_record/persistence.rb#L10
48+
# Example: Patches::PersistenceClassMethods refers to https://github.com/rails/rails/blob/v7.0.0/activerecord/lib/active_record/persistence.rb#L10
4949
# which is included into ActiveRecord::Base in https://github.com/rails/rails/blob/914caca2d31bd753f47f9168f2a375921d9e91cc/activerecord/lib/active_record/base.rb#L283
5050
::ActiveRecord::Base.prepend(Patches::Querying)
5151
::ActiveRecord::Base.prepend(Patches::Persistence)

instrumentation/active_record/opentelemetry-instrumentation-active_record.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
2828
spec.add_dependency 'opentelemetry-api', '~> 1.0'
2929
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'
3030

31-
spec.add_development_dependency 'activerecord', '>= 6.1'
3231
spec.add_development_dependency 'appraisal', '~> 2.5'
3332
spec.add_development_dependency 'bundler', '~> 2.4'
3433
spec.add_development_dependency 'minitest', '~> 5.0'

instrumentation/active_support/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "activesupport-#{version}" do
99
gem 'activesupport', "~> #{version}"
1010
end

instrumentation/active_support/lib/opentelemetry/instrumentation/active_support/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Instrumentation
99
module ActiveSupport
1010
# The Instrumentation class contains logic to detect and install the ActiveSupport instrumentation
1111
class Instrumentation < OpenTelemetry::Instrumentation::Base
12-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
12+
MINIMUM_VERSION = Gem::Version.new('7')
1313

1414
install do |_config|
1515
require_dependencies

instrumentation/active_support/opentelemetry-instrumentation-active_support.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
3636
spec.add_development_dependency 'opentelemetry-test-helpers', '~> 0.3'
3737
spec.add_development_dependency 'pry'
3838
spec.add_development_dependency 'pry-byebug'
39-
spec.add_development_dependency 'rails', '>= 6.1'
4039
spec.add_development_dependency 'rake', '~> 13.0'
4140
spec.add_development_dependency 'rspec-mocks'
4241
spec.add_development_dependency 'rubocop', '~> 1.69.1'

instrumentation/delayed_job/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "delayed_job_4.1-activejob-#{version}" do
99
gem 'delayed_job', '~> 4.1'
1010
gem 'activejob', "~> #{version}"

instrumentation/pg/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ source 'https://rubygems.org'
99
gemspec
1010

1111
group :test do
12+
gem 'activerecord', '>= 7.0.0'
1213
gem 'opentelemetry-instrumentation-base', path: '../base'
1314
gem 'opentelemetry-helpers-sql-obfuscation', path: '../../helpers/sql-obfuscation'
1415
end

instrumentation/pg/opentelemetry-instrumentation-pg.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Gem::Specification.new do |spec|
2929
spec.add_dependency 'opentelemetry-helpers-sql-obfuscation'
3030
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.22.1'
3131

32-
spec.add_development_dependency 'activerecord', '> 6.1.0'
3332
spec.add_development_dependency 'appraisal', '~> 2.5'
3433
spec.add_development_dependency 'bundler', '~> 2.4'
3534
spec.add_development_dependency 'minitest', '~> 5.0'

instrumentation/que/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source 'https://rubygems.org'
99
gemspec
1010

1111
group :test do
12-
gem 'activerecord', '< 7.2.0', '> 6.1.0'
12+
gem 'activerecord', '< 7.2.0', '> 7.0.0'
1313
gem 'pg'
1414
gem 'opentelemetry-helpers-sql-obfuscation', path: '../../helpers/sql-obfuscation'
1515
gem 'opentelemetry-instrumentation-base', path: '../base'

instrumentation/rails/Appraisals

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

7-
%w[6.1.0 7.0.0 7.1.0].each do |version|
7+
%w[7.0.0 7.1.0].each do |version|
88
appraise "rails-#{version}" do
99
gem 'rails', "~> #{version}"
1010
end

instrumentation/rails/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gem opentelemetry-instrumentation-rails, "<version>"
2424
| --- | --- |
2525
| `5.2` | `= 0.24.1` |
2626
| `6.0` | `= 0.28.0` |
27-
| `6.1` | `~> 0.24` |
27+
| `6.1` | `= 0.24` |
2828
| `7.x` | `~> 0.24` |
2929

3030
## Usage

instrumentation/rails/lib/opentelemetry/instrumentation/rails/instrumentation.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Rails
1212
# The Instrumentation class contains logic to detect and install the Rails
1313
# instrumentation
1414
class Instrumentation < OpenTelemetry::Instrumentation::Base
15-
MINIMUM_VERSION = Gem::Version.new('6.1.0')
15+
MINIMUM_VERSION = Gem::Version.new('7')
1616

1717
# This gem requires the instrumentantion gems for the different
1818
# components of Rails, as a result it does not have any explicit

0 commit comments

Comments
 (0)