activerecord-instrumentation 0.5.2 → 0.6.0.jhemphill1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/active_record/open_tracing/processor.rb +16 -8
- 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: 2f9fe8e655275c95316af6091d55c794c384c20b721c301056661aa4eca8aafd
|
4
|
+
data.tar.gz: 128ba9528fdc517e3fddfab4ad75cad0cfea8fd4f4dab7f371cfd0b7c79c5699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b3b8da9054b12445889993ee125a3ef456ff97f056ef3ee6194d3bfc100eb263401335e797681334dd58745bc3d9108110bf3b2aa9e69212d25f68a9e840a03
|
7
|
+
data.tar.gz: de602d96113006ff75dbaf44a497289f5fcc193b1fd8a5797a35c3a4bfafa65a546effd7152db406ca901dfc738bae538ef214c24a485888ac9a96e52bf4b668
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activerecord-instrumentation (0.
|
4
|
+
activerecord-instrumentation (0.6.0.jhemphill1)
|
5
5
|
activerecord
|
6
6
|
opentracing (~> 0.5)
|
7
7
|
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
ast (2.4.0)
|
23
23
|
concurrent-ruby (1.1.9)
|
24
24
|
diff-lcs (1.3)
|
25
|
-
i18n (1.
|
25
|
+
i18n (1.10.0)
|
26
26
|
concurrent-ruby (~> 1.0)
|
27
27
|
jaro_winkler (1.5.4)
|
28
28
|
minitest (5.15.0)
|
@@ -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.5.
|
69
|
+
zeitwerk (2.5.4)
|
70
70
|
|
71
71
|
PLATFORMS
|
72
72
|
ruby
|
@@ -79,7 +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.address" => peer_address_tag
|
82
|
+
"peer.address" => peer_address_tag(payload.fetch(:connection, false))
|
83
83
|
}.merge(db_statement(payload))
|
84
84
|
end
|
85
85
|
|
@@ -104,13 +104,21 @@ module ActiveRecord
|
|
104
104
|
sanitizer ? sanitizer.sanitize(sql) : sql
|
105
105
|
end
|
106
106
|
|
107
|
-
def peer_address_tag
|
108
|
-
@peer_address_tag
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
107
|
+
def peer_address_tag(connection)
|
108
|
+
unless defined? @peer_address_tag
|
109
|
+
if connection.respond_to? :host # using the postgres adapter
|
110
|
+
@peer_address_tag = connection.host
|
111
|
+
else
|
112
|
+
@peer_address_tag = [
|
113
|
+
"#{connection_config.fetch(:adapter)}://",
|
114
|
+
connection_config[:username],
|
115
|
+
connection_config[:host] && "@#{connection_config[:host]}",
|
116
|
+
"/#{db_instance}"
|
117
|
+
].join
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
@peer_address_tag
|
114
122
|
end
|
115
123
|
|
116
124
|
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.jhemphill1
|
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-11 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.1.6
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: ActiveRecord OpenTracing intrumenter
|