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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/opentelemetry/instrumentation/active_record/instrumentation.rb +3 -2
- data/lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb +12 -13
- data/lib/opentelemetry/instrumentation/active_record/version.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a0a2a81d85b0b8ebcfde872b4fe3b4f9b85426624952c0882ed1a6e22530bd4
|
4
|
+
data.tar.gz: ba39f10def3f05ed1578b1e555bbf1083d0dbdcd30bec5225db1e8f5c383941b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a85a6c8454213a2d5fc059cb136b6e294e9976f900df85ae938942538d41768c9ab95bee5a1e96af6c283a39c126d18572cedc20e7f62a69eb4dce496f589e1
|
7
|
+
data.tar.gz: 071ce33dd775bdcbf2d34d0da122d38b80589314ae39ed8859876527d8fa59d855a2ffc7a1e4486098ac16051aa55c96672085bb591d6c97a871ef4902c41a17
|
data/CHANGELOG.md
CHANGED
@@ -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 =
|
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
|
-
|
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'
|
data/lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb
CHANGED
@@ -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(
|
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(
|
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!(
|
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!(
|
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(
|
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(
|
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
|
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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:
|