activerecord-instrumentation 0.5.2 → 0.6.0.jhemphill3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +11 -11
- data/lib/active_record/open_tracing/processor.rb +13 -6
- data/lib/active_record/open_tracing/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95c186a845e1f54640ec23d41c6f4af63672c70a2b40eead66abd7dfdfa9a5d9
|
4
|
+
data.tar.gz: 5dbd6b7b69424ff53fe2aaaecd2c9980ea427f32ac85b69f779b6bd60fbfe1c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1542c660df6a46953df85ed993648afcf28b3a5195560176b528d7f03dd148ad404bbe53e732ea8ac4a0fa6f81cc471e89bb8931da42aa0c181ac93c819f8b36
|
7
|
+
data.tar.gz: bf4172f41056e08ef86bbcab7a6c56cd2d044d90f18ccd600ac59758ead73abf056283e7b2424771460b6a1ed6fd9a74d0d36ac790986629810d429167d259b6
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activerecord-instrumentation (0.
|
4
|
+
activerecord-instrumentation (0.6.0.jhemphill3)
|
5
5
|
activerecord
|
6
6
|
opentracing (~> 0.5)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (6.1.
|
12
|
-
activesupport (= 6.1.
|
13
|
-
activerecord (6.1.
|
14
|
-
activemodel (= 6.1.
|
15
|
-
activesupport (= 6.1.
|
16
|
-
activesupport (6.1.
|
11
|
+
activemodel (6.1.6.1)
|
12
|
+
activesupport (= 6.1.6.1)
|
13
|
+
activerecord (6.1.6.1)
|
14
|
+
activemodel (= 6.1.6.1)
|
15
|
+
activesupport (= 6.1.6.1)
|
16
|
+
activesupport (6.1.6.1)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (>= 1.6, < 2)
|
19
19
|
minitest (>= 5.1)
|
20
20
|
tzinfo (~> 2.0)
|
21
21
|
zeitwerk (~> 2.3)
|
22
22
|
ast (2.4.0)
|
23
|
-
concurrent-ruby (1.1.
|
23
|
+
concurrent-ruby (1.1.10)
|
24
24
|
diff-lcs (1.3)
|
25
|
-
i18n (1.
|
25
|
+
i18n (1.11.0)
|
26
26
|
concurrent-ruby (~> 1.0)
|
27
27
|
jaro_winkler (1.5.4)
|
28
|
-
minitest (5.
|
28
|
+
minitest (5.16.2)
|
29
29
|
opentracing (0.5.0)
|
30
30
|
opentracing_test_tracer (0.1.1)
|
31
31
|
opentracing
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
tzinfo (2.0.4)
|
67
67
|
concurrent-ruby (~> 1.0)
|
68
68
|
unicode-display_width (1.6.1)
|
69
|
-
zeitwerk (2.
|
69
|
+
zeitwerk (2.6.0)
|
70
70
|
|
71
71
|
PLATFORMS
|
72
72
|
ruby
|
@@ -79,6 +79,7 @@ module ActiveRecord
|
|
79
79
|
"db.instance" => db_instance,
|
80
80
|
"db.cached" => payload.fetch(:cached, false),
|
81
81
|
"db.type" => DB_TYPE,
|
82
|
+
"peer.mysql_db_name" => mysql_db_name_tag(payload.fetch(:connection, nil)&.raw_connection),
|
82
83
|
"peer.address" => peer_address_tag
|
83
84
|
}.merge(db_statement(payload))
|
84
85
|
end
|
@@ -104,13 +105,19 @@ module ActiveRecord
|
|
104
105
|
sanitizer ? sanitizer.sanitize(sql) : sql
|
105
106
|
end
|
106
107
|
|
108
|
+
def mysql_db_name_tag(db_connection)
|
109
|
+
return db_connection.host if db_connection.respond_to?(:host)
|
110
|
+
return nil
|
111
|
+
end
|
112
|
+
|
107
113
|
def peer_address_tag
|
108
|
-
@peer_address_tag ||=
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
+
@peer_address_tag ||=
|
115
|
+
[
|
116
|
+
"#{connection_config.fetch(:adapter)}://",
|
117
|
+
connection_config[:username],
|
118
|
+
connection_config[:host] && "@#{connection_config[:host]}",
|
119
|
+
"/#{db_instance}"
|
120
|
+
].join
|
114
121
|
end
|
115
122
|
|
116
123
|
def db_instance
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0.jhemphill3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -209,11 +209,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
|
-
- - "
|
212
|
+
- - ">"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
214
|
+
version: 1.3.1
|
215
215
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
216
|
+
rubygems_version: 3.3.11
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: ActiveRecord OpenTracing intrumenter
|