opentelemetry-instrumentation-active_record 0.11.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b36dde4fd467787fd03c10dbf48ab109cff8bce04e541f52235fc791f2f4cfd7
4
- data.tar.gz: df7f31be53af785f5849534c2445f77da424995a6396839eb16661574fb53348
3
+ metadata.gz: 10525f346f461ce9030401a57e9b068cdb5cc22007aaf9989940fef29432f8b5
4
+ data.tar.gz: 2dd10d346a11b856c42a170e527bc48c04940c8cba6d0edc822aafada5d0dac8
5
5
  SHA512:
6
- metadata.gz: 97700e2d9f0c50a3edd8225d6ccec28187ba6d9c08c7f7011fa854f42344e500fb32a483569039e4623d1205d7d322b18741644a206d768beaec2668f631fc64
7
- data.tar.gz: a0b57bc38e4193eef8f433f55a958b52ba2f21c7394e7fcf723fd89d7941b890ff64ddf4e0ee4e1b6e24229bd06394f7d9bb17b51f3923fff16ba491899e28af
6
+ metadata.gz: 1e2df825d904c0d5d2591293d7bf1ccfada499c5388afe4bc0fd9a94ee2af8040ffcd119e3838ac3d594cfd100ae6b10eb7231da97fbad307353e4d2d86f96ab
7
+ data.tar.gz: 8067d238201423aecdd2bbe1ed54be8a5526832932b301b8ddf71857a0b98c01ece54066e8021f6f587c1a9467fb574f7e232b820d4f0d6043bb90723f23a04b
data/CHANGELOG.md CHANGED
@@ -1,118 +1,124 @@
1
1
  # Release History: opentelemetry-instrumentation-active_record
2
2
 
3
- ### v0.11.1 / 2025-10-22
3
+ ## v0.13.0 / 2026-04-28
4
4
 
5
- * FIXED: Update opentelemetry-instrumentation-base dependency
5
+ - BREAKING CHANGE: Min Rails 7.1 (enforced this time) (#2283)
6
+ - ADDED: Min Rails 7.1 (enforced this time) (#2283)
6
7
 
7
- ### v0.11.0 / 2025-10-21
8
+ ## v0.12.0 / 2026-04-14
8
9
 
9
- * BREAKING CHANGE: Min Ruby Version 3.2 and Rails 7.1
10
+ - BREAKING CHANGE: Min Ruby Version 3.3 (#2125)
11
+ - ADDED: Min Ruby Version 3.3 (#2125)
12
+ - ADDED: Add release tag into source code url of gem metadata (#1984)
10
13
 
11
- * ADDED: Min Ruby Version 3.2 and Rails 7.1
14
+ ## v0.11.1 / 2025-10-22
12
15
 
13
- ### v0.10.1 / 2025-09-30
16
+ - FIXED: Update opentelemetry-instrumentation-base dependency
14
17
 
15
- * FIXED: Min OTel Ruby API 1.7
18
+ ## v0.11.0 / 2025-10-21
16
19
 
17
- ### v0.10.0 / 2025-09-30
20
+ - BREAKING CHANGE: Min Ruby Version 3.2 and Rails 7.1
21
+ - ADDED: Min Ruby Version 3.2 and Rails 7.1
18
22
 
19
- * ADDED: Bump minimum API Version to 1.7
23
+ ## v0.10.1 / 2025-09-30
20
24
 
21
- ### v0.9.0 / 2025-01-16
25
+ - FIXED: Min OTel Ruby API 1.7
22
26
 
23
- * BREAKING CHANGE: Drop Support for EoL Rails 6.1
24
- * BREAKING CHANGE: Set minimum supported version to Ruby 3.1
27
+ ## v0.10.0 / 2025-09-30
25
28
 
26
- * ADDED: Drop Support for EoL Rails 6.1
27
- * ADDED: Set minimum supported version to Ruby 3.1
29
+ - ADDED: Bump minimum API Version to 1.7
28
30
 
29
- ### v0.8.1 / 2024-11-21
31
+ ## v0.9.0 / 2025-01-16
30
32
 
31
- * FIXED: Pass block argument in ActiveRecord `find_by_sql` patch.
33
+ - BREAKING CHANGE: Drop Support for EoL Rails 6.1
34
+ - BREAKING CHANGE: Set minimum supported version to Ruby 3.1
35
+ - ADDED: Drop Support for EoL Rails 6.1
36
+ - ADDED: Set minimum supported version to Ruby 3.1
32
37
 
33
- ### v0.8.0 / 2024-10-22
38
+ ## v0.8.1 / 2024-11-21
34
39
 
35
- * BREAKING CHANGE: Rename Active Record find_by_sql spans to query
36
- * FIXED: Emit Active Record query spans for Rails 7.0+
40
+ - FIXED: Pass block argument in ActiveRecord `find_by_sql` patch.
37
41
 
38
- ### v0.7.4 / 2024-08-19
42
+ ## v0.8.0 / 2024-10-22
39
43
 
40
- * FIXED: Use ActiveSupport from top-level namespace (NoMethodError on_load)
44
+ - BREAKING CHANGE: Rename Active Record find_by_sql spans to query
45
+ - FIXED: Emit Active Record query spans for Rails 7.0+
41
46
 
42
- ### v0.7.3 / 2024-08-15
47
+ ## v0.7.4 / 2024-08-19
43
48
 
44
- * FIXED: Use Active Support Lazy Load Hooks to avoid prematurely initializing ActiveRecord::Base and ActiveJob::Base
49
+ - FIXED: Use ActiveSupport from top-level namespace (NoMethodError on_load)
45
50
 
46
- ### v0.7.2 / 2024-04-30
51
+ ## v0.7.3 / 2024-08-15
47
52
 
48
- * FIXED: Resolve active_record testing issue
53
+ - FIXED: Use Active Support Lazy Load Hooks to avoid prematurely initializing ActiveRecord::Base and ActiveJob::Base
49
54
 
50
- ### v0.7.1 / 2024-04-05
55
+ ## v0.7.2 / 2024-04-30
51
56
 
52
- * FIXED: Instrumentation/active_record: add `:allow_retry` option to `find_by_sql` patch
57
+ - FIXED: Resolve active_record testing issue
53
58
 
54
- ### v0.7.0 / 2023-11-22
59
+ ## v0.7.1 / 2024-04-05
55
60
 
56
- * BREAKING CHANGE: Drop Rails 6.0 EOL
61
+ - FIXED: Instrumentation/active_record: add `:allow_retry` option to `find_by_sql` patch
57
62
 
58
- * ADDED: Drop Rails 6.0 EOL
63
+ ## v0.7.0 / 2023-11-22
59
64
 
60
- ### v0.6.3 / 2023-10-16
65
+ - BREAKING CHANGE: Drop Rails 6.0 EOL
66
+ - ADDED: Drop Rails 6.0 EOL
61
67
 
62
- * FIXED: Add Rails 7.1 compatibility
68
+ ## v0.6.3 / 2023-10-16
63
69
 
64
- ### v0.6.2 / 2023-08-14
70
+ - FIXED: Add Rails 7.1 compatibility
65
71
 
66
- * FIXED: Ensure that transaction name property is used, rather than self
72
+ ## v0.6.2 / 2023-08-14
67
73
 
68
- ### v0.6.1 / 2023-06-05
74
+ - FIXED: Ensure that transaction name property is used, rather than self
69
75
 
70
- * FIXED: Base config options
76
+ ## v0.6.1 / 2023-06-05
71
77
 
72
- ### v0.6.0 / 2023-04-17
78
+ - FIXED: Base config options
73
79
 
74
- * BREAKING CHANGE: Drop support for EoL Ruby 2.7
80
+ ## v0.6.0 / 2023-04-17
75
81
 
76
- * ADDED: Drop support for EoL Ruby 2.7
82
+ - BREAKING CHANGE: Drop support for EoL Ruby 2.7
83
+ - ADDED: Drop support for EoL Ruby 2.7
77
84
 
78
- ### v0.5.0 / 2023-02-01
85
+ ## v0.5.0 / 2023-02-01
79
86
 
80
- * BREAKING CHANGE: Drop Rails 5 Support
87
+ - BREAKING CHANGE: Drop Rails 5 Support
88
+ - ADDED: Drop Rails 5 Support
81
89
 
82
- * ADDED: Drop Rails 5 Support
90
+ ## v0.4.1 / 2023-01-14
83
91
 
84
- ### v0.4.1 / 2023-01-14
92
+ - DOCS: Fix gem homepage
93
+ - DOCS: More gem documentation fixes
85
94
 
86
- * DOCS: Fix gem homepage
87
- * DOCS: More gem documentation fixes
95
+ ## v0.4.0 / 2022-06-09
88
96
 
89
- ### v0.4.0 / 2022-06-09
97
+ - Upgrading Base dependency version
98
+ - FIXED: Broken test file requirements
90
99
 
91
- * Upgrading Base dependency version
92
- * FIXED: Broken test file requirements
100
+ ## v0.3.0 / 2022-05-02
93
101
 
94
- ### v0.3.0 / 2022-05-02
102
+ - ADDED: Make ActiveRecord 7 compatible
103
+ - FIXED: RubyGems Fallback
95
104
 
96
- * ADDED: Make ActiveRecord 7 compatible
97
- * FIXED: RubyGems Fallback
105
+ ## v0.2.2 / 2021-12-01
98
106
 
99
- ### v0.2.2 / 2021-12-01
107
+ - FIXED: Add max supported version for active record
100
108
 
101
- * FIXED: Add max supported version for active record
109
+ ## v0.2.1 / 2021-09-29
102
110
 
103
- ### v0.2.1 / 2021-09-29
111
+ - (No significant changes)
104
112
 
105
- * (No significant changes)
113
+ ## v0.2.0 / 2021-09-29
106
114
 
107
- ### v0.2.0 / 2021-09-29
115
+ - ADDED: Trace update_all and delete_all calls in ActiveRecord
116
+ - FIXED: Remove Active Record instantiation patch
108
117
 
109
- * ADDED: Trace update_all and delete_all calls in ActiveRecord
110
- * FIXED: Remove Active Record instantiation patch
118
+ ## v0.1.1 / 2021-08-12
111
119
 
112
- ### v0.1.1 / 2021-08-12
120
+ - (No significant changes)
113
121
 
114
- * (No significant changes)
122
+ ## v0.1.0 / 2021-07-08
115
123
 
116
- ### v0.1.0 / 2021-07-08
117
-
118
- * Initial release, adds instrumentation patches to querying and persistence methods.
124
+ - Initial release, adds instrumentation patches to querying and persistence methods.
@@ -9,7 +9,7 @@ module OpenTelemetry
9
9
  module ActiveRecord
10
10
  # The Instrumentation class contains logic to detect and install the ActiveRecord instrumentation
11
11
  class Instrumentation < OpenTelemetry::Instrumentation::Base
12
- MINIMUM_VERSION = Gem::Version.new('7')
12
+ MINIMUM_VERSION = Gem::Version.new('7.1')
13
13
 
14
14
  install do |_config|
15
15
  require_dependencies
@@ -7,7 +7,7 @@ module OpenTelemetry
7
7
  module Instrumentation
8
8
  module ActiveRecord
9
9
  module Patches
10
- # Module to prepend to ActiveRecord::Base for instrumentating
10
+ # Module to prepend to ActiveRecord::Base for instrumenting
11
11
  # insert/upsert class methods added in Rails 6.0
12
12
  module PersistenceInsertClassMethods
13
13
  def self.prepended(base)
@@ -18,11 +18,9 @@ module OpenTelemetry
18
18
 
19
19
  # Contains ActiveRecord::Querying to be patched
20
20
  module ClassMethods
21
- method_name = ::ActiveRecord.version >= Gem::Version.new('7.0.0') ? :_query_by_sql : :find_by_sql
22
-
23
- define_method(method_name) do |*args, **kwargs, &block|
21
+ def _query_by_sql(...)
24
22
  tracer.in_span("#{self} query") do
25
- super(*args, **kwargs, &block)
23
+ super
26
24
  end
27
25
  end
28
26
 
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActiveRecord
10
- VERSION = '0.11.1'
10
+ VERSION = '0.13.0'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-10-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: opentelemetry-instrumentation-base
@@ -51,11 +50,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
51
50
  licenses:
52
51
  - Apache-2.0
53
52
  metadata:
54
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_record/0.11.1/file/CHANGELOG.md
55
- source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/active_record
53
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_record/0.13.0/file/CHANGELOG.md
54
+ source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/opentelemetry-instrumentation-active_record/v0.13.0/instrumentation/active_record
56
55
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
57
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_record/0.11.1
58
- post_install_message:
56
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-active_record/0.13.0
59
57
  rdoc_options: []
60
58
  require_paths:
61
59
  - lib
@@ -63,15 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
63
61
  requirements:
64
62
  - - ">="
65
63
  - !ruby/object:Gem::Version
66
- version: '3.2'
64
+ version: '3.3'
67
65
  required_rubygems_version: !ruby/object:Gem::Requirement
68
66
  requirements:
69
67
  - - ">="
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
- rubygems_version: 3.4.19
74
- signing_key:
71
+ rubygems_version: 4.0.6
75
72
  specification_version: 4
76
73
  summary: ActiveRecord instrumentation for the OpenTelemetry framework
77
74
  test_files: []