activerecord-instrumentation 0.5.2.pre → 0.6.0.jhemphill2

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: 552dc57cfc31114a68ff8d67f106df28ea087bbd662c169209b31e4d9563fc9f
4
- data.tar.gz: 1551515fbc21a3cf984228a2a5e21c202553ce11ac54e915b2ce2fab03836089
3
+ metadata.gz: 29ef8227c4292b15e644ab1b59e56c28d48d97e36fe7be95862678bae61e5d9c
4
+ data.tar.gz: 0e1efa52bb4a69a41b219028e8a25d9b21a67026c138d08c4b05b4bf72ab85bd
5
5
  SHA512:
6
- metadata.gz: 652444a4d667c58d11f6d19021233c7f826ad1a3e79f1a0e3bcd114f2d33baeee895d5a2636a661910b420057fd96b4d4a8288a3796c618dac5441b8756ce698
7
- data.tar.gz: 57d299fdbf5418895094117076ba234e27137a81f97b5912ccfb79b8377b11a77e517a05aa3ca84f5dcb41b3f3777248d585fc3704bf1bb8ce1bd9a078412545
6
+ metadata.gz: fc2935010852dca0b75cc17d3add77c3257a7b636117eb0fd58e19cb06132d6f2475bc9ecf02964e970625b2660b51f4d1e8eeb8b9265d693b7fc835c34654e4
7
+ data.tar.gz: a7368790d1e844bf6b47812b50c2b439081c79648869f1eaf0dfba6e573568b0b7bd4097df7eefd7ce9dbe35cc9b584b0e4f5238dfd7c701cdbda2fb9f2279ab
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- ## 0.5.2.pre 01/24/2022
4
+ ## 0.6.0.jhemphill2 07/11/2022
5
+ * Fixed query tagging for empty queries
6
+
7
+ ## 0.5.2 01/24/2022
5
8
  * Fixed query tagging for empty queries
6
9
 
7
10
  ## 0.5.1 01/20/2022
data/Gemfile.lock CHANGED
@@ -1,31 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-instrumentation (0.5.2.pre)
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.4.4)
12
- activesupport (= 6.1.4.4)
13
- activerecord (6.1.4.4)
14
- activemodel (= 6.1.4.4)
15
- activesupport (= 6.1.4.4)
16
- activesupport (6.1.4.4)
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.9)
23
+ concurrent-ruby (1.1.10)
24
24
  diff-lcs (1.3)
25
- i18n (1.8.11)
25
+ i18n (1.11.0)
26
26
  concurrent-ruby (~> 1.0)
27
27
  jaro_winkler (1.5.4)
28
- minitest (5.15.0)
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.5.3)
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
- "peer.address" => peer_address_tag
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
- "#{connection_config.fetch(:adapter)}://",
110
- connection_config[:username],
111
- connection_config[:host] && "@#{connection_config[:host]}",
112
- "/#{db_instance}"
113
- ].join
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module OpenTracing
5
- VERSION = "0.5.2.pre"
5
+ VERSION = "0.6.0.jhemphill2"
6
6
  end
7
7
  end
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.5.2.pre
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-01-24 00:00:00.000000000 Z
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.2.32
216
+ rubygems_version: 3.3.11
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: ActiveRecord OpenTracing intrumenter