activerecord-instrumentation 0.5.2.pre → 0.6.0.jhemphill2
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 +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +11 -11
- data/lib/active_record/open_tracing/processor.rb +18 -8
- data/lib/active_record/open_tracing/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29ef8227c4292b15e644ab1b59e56c28d48d97e36fe7be95862678bae61e5d9c
|
4
|
+
data.tar.gz: 0e1efa52bb4a69a41b219028e8a25d9b21a67026c138d08c4b05b4bf72ab85bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc2935010852dca0b75cc17d3add77c3257a7b636117eb0fd58e19cb06132d6f2475bc9ecf02964e970625b2660b51f4d1e8eeb8b9265d693b7fc835c34654e4
|
7
|
+
data.tar.gz: a7368790d1e844bf6b47812b50c2b439081c79648869f1eaf0dfba6e573568b0b7bd4097df7eefd7ce9dbe35cc9b584b0e4f5238dfd7c701cdbda2fb9f2279ab
|
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.jhemphill2)
|
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)
|
12
|
+
activesupport (= 6.1.6)
|
13
|
+
activerecord (6.1.6)
|
14
|
+
activemodel (= 6.1.6)
|
15
|
+
activesupport (= 6.1.6)
|
16
|
+
activesupport (6.1.6)
|
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,7 +79,8 @@ module ActiveRecord
|
|
79
79
|
"db.instance" => db_instance,
|
80
80
|
"db.cached" => payload.fetch(:cached, false),
|
81
81
|
"db.type" => DB_TYPE,
|
82
|
-
"
|
82
|
+
"connection" => payload[:connection].inspect,
|
83
|
+
"peer.address" => peer_address_tag(payload.fetch(:connection, false))
|
83
84
|
}.merge(db_statement(payload))
|
84
85
|
end
|
85
86
|
|
@@ -104,13 +105,22 @@ module ActiveRecord
|
|
104
105
|
sanitizer ? sanitizer.sanitize(sql) : sql
|
105
106
|
end
|
106
107
|
|
107
|
-
def peer_address_tag
|
108
|
-
@peer_address_tag
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
108
|
+
def peer_address_tag(connection)
|
109
|
+
unless defined? @peer_address_tag
|
110
|
+
if connection.respond_to? :host # using the postgres/mysql adapter
|
111
|
+
@peer_address_tag = connection.host + "_hotdogs_"
|
112
|
+
else
|
113
|
+
@peer_address_tag = "farts"
|
114
|
+
# [
|
115
|
+
# "#{connection_config.fetch(:adapter)}://",
|
116
|
+
# connection_config[:username],
|
117
|
+
# connection_config[:host] && "@#{connection_config[:host]}",
|
118
|
+
# "/#{db_instance}"
|
119
|
+
# ].join
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
@peer_address_tag
|
114
124
|
end
|
115
125
|
|
116
126
|
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.jhemphill2
|
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
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
- !ruby/object:Gem::Version
|
214
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
|