opentelemetry-instrumentation-active_record 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f45fc126930cb5135a9ab42d14cf285050c7e9b207c8d584c098848100dfd68
4
- data.tar.gz: cb43858ecd8428af9ebc579298047087e1987c7d5d86ffa87027739732a0ef64
3
+ metadata.gz: 6a0a2a81d85b0b8ebcfde872b4fe3b4f9b85426624952c0882ed1a6e22530bd4
4
+ data.tar.gz: ba39f10def3f05ed1578b1e555bbf1083d0dbdcd30bec5225db1e8f5c383941b
5
5
  SHA512:
6
- metadata.gz: 350d5b0dd98032a79ba02784e5f670d75944a6ee5f715220929c4bb06f176e1a3e8cf2c39493917814a4156b95acb055e333a19120e87dba0b3d8ca35b0a0a7a
7
- data.tar.gz: 8e575d88192b7e9399bf194cd0e2b4cc3463e9302dfa1195c218a928ee1149ef47db99d8738e8a993703955bdeea5bab372d66d91c8949448f29da98bd9a42dc
6
+ metadata.gz: 0a85a6c8454213a2d5fc059cb136b6e294e9976f900df85ae938942538d41768c9ab95bee5a1e96af6c283a39c126d18572cedc20e7f62a69eb4dce496f589e1
7
+ data.tar.gz: 071ce33dd775bdcbf2d34d0da122d38b80589314ae39ed8859876527d8fa59d855a2ffc7a1e4486098ac16051aa55c96672085bb591d6c97a871ef4902c41a17
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-active_record
2
2
 
3
+ ### v0.3.0 / 2022-05-02
4
+
5
+ * ADDED: Make ActiveRecord 7 compatible
6
+ * FIXED: RubyGems Fallback
7
+
3
8
  ### v0.2.2 / 2021-12-01
4
9
 
5
10
  * FIXED: Add max supported version for active record
@@ -10,7 +10,7 @@ module OpenTelemetry
10
10
  # The Instrumentation class contains logic to detect and install the ActiveRecord instrumentation
11
11
  class Instrumentation < OpenTelemetry::Instrumentation::Base
12
12
  MINIMUM_VERSION = Gem::Version.new('5.2.0')
13
- MAX_MAJOR_VERSION = 6
13
+ MAX_MAJOR_VERSION = 7
14
14
 
15
15
  install do |_config|
16
16
  require_dependencies
@@ -36,7 +36,7 @@ module OpenTelemetry
36
36
  end
37
37
 
38
38
  def gem_version
39
- Gem.loaded_specs['activerecord'].version
39
+ ::ActiveRecord.version
40
40
  end
41
41
 
42
42
  def patch
@@ -60,6 +60,7 @@ module OpenTelemetry
60
60
  end
61
61
 
62
62
  def require_dependencies
63
+ require 'ruby2_keywords'
63
64
  require_relative 'patches/querying'
64
65
  require_relative 'patches/persistence'
65
66
  require_relative 'patches/persistence_class_methods'
@@ -3,7 +3,6 @@
3
3
  # Copyright The OpenTelemetry Authors
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
-
7
6
  module OpenTelemetry
8
7
  module Instrumentation
9
8
  module ActiveRecord
@@ -19,39 +18,39 @@ module OpenTelemetry
19
18
 
20
19
  # Contains ActiveRecord::Persistence::ClassMethods to be patched
21
20
  module ClassMethods
22
- def insert(attributes, returning: nil, unique_by: nil)
21
+ ruby2_keywords def insert(*args)
23
22
  tracer.in_span("#{self}.insert") do
24
- super
23
+ super(*args)
25
24
  end
26
25
  end
27
26
 
28
- def insert_all(attributes, returning: nil, unique_by: nil)
27
+ ruby2_keywords def insert_all(*args)
29
28
  tracer.in_span("#{self}.insert_all") do
30
- super
29
+ super(*args)
31
30
  end
32
31
  end
33
32
 
34
- def insert!(attributes, returning: nil)
33
+ ruby2_keywords def insert!(*args)
35
34
  tracer.in_span("#{self}.insert!") do
36
- super
35
+ super(*args)
37
36
  end
38
37
  end
39
38
 
40
- def insert_all!(attributes, returning: nil)
39
+ ruby2_keywords def insert_all!(*args)
41
40
  tracer.in_span("#{self}.insert_all!") do
42
- super
41
+ super(*args)
43
42
  end
44
43
  end
45
44
 
46
- def upsert(attributes, returning: nil, unique_by: nil)
45
+ ruby2_keywords def upsert(*args)
47
46
  tracer.in_span("#{self}.upsert") do
48
- super
47
+ super(*args)
49
48
  end
50
49
  end
51
50
 
52
- def upsert_all(attributes, returning: nil, unique_by: nil)
51
+ ruby2_keywords def upsert_all(*args)
53
52
  tracer.in_span("#{self}.upsert_all") do
54
- super
53
+ super(*args)
55
54
  end
56
55
  end
57
56
 
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module ActiveRecord
10
- VERSION = '0.2.2'
10
+ VERSION = '0.3.0'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-active_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-01 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -30,14 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.19.0
33
+ version: 0.20.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.19.0
40
+ version: 0.20.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: ruby2_keywords
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: activerecord
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -219,10 +233,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
219
233
  licenses:
220
234
  - Apache-2.0
221
235
  metadata:
222
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-active_record/v0.2.2/file.CHANGELOG.html
236
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-active_record/v0.3.0/file.CHANGELOG.html
223
237
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/active_record
224
238
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
225
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-active_record/v0.2.2
239
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-active_record/v0.3.0
226
240
  post_install_message:
227
241
  rdoc_options: []
228
242
  require_paths: