jcw 0.2.4 → 0.3.0

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: e7f97935444bb8d0285e96565c731f99e65df848573cc0257eb041dc90d3bf8b
4
- data.tar.gz: a119efdd207f9ebf9965cb8a62fab5c8e3541db7535e5649a14808f02a0683f9
3
+ metadata.gz: c1f8f9b595186e86f086290543b8b4ea880a174dab1e1a94d11f8afd151479b8
4
+ data.tar.gz: 209f2ff14d28cd1a7ca7d586c17c53e8505ce170f23d81f5b5de42a4f6544f29
5
5
  SHA512:
6
- metadata.gz: b70cfaecfca2e89dda7c95eb471d0169afc9deb286fb42481f36663db89c07850ef8c7d5185b7cb47658313e812d01328f95d8f68a88a8e4db6b0b37007f5a2f
7
- data.tar.gz: 14ca08c194b0c3c710670f7b9e77f6584a269366167a3ec4bfadaf042c7fa0e60776981af46b2dff7af69ed0a96fafd116585fbfa1a2721624225d9aeec399c1
6
+ metadata.gz: ad26e8445a04470d780aa4a4aed1f4aa50653b1db80b55cd24238fc95dde6c17d1e94e33924706c766885e957633f55ed47e50365f17cecff79b5ab3766299c9
7
+ data.tar.gz: d4b076df8cdcfdf35a0a31998ad7d248ce77c7dca6f6c3b6291e4d4b90b424b66c89678ac16188b1a3f5cca62a48428eec555bd6954f35c95ad228de68dcb980
@@ -41,7 +41,7 @@ jobs:
41
41
  strategy:
42
42
  fail-fast: false
43
43
  matrix:
44
- ruby: [2.6, 2.7, 2.7.4, 3.0.0, 3.0.1, 3.0.2]
44
+ ruby: [2.6, 2.7, 2.7.4, 3.0.0, 3.0.1, 3.0.2, 3.1.0]
45
45
  experimental: [false]
46
46
 
47
47
  steps:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jcw (0.2.4)
4
+ jcw (0.3.0)
5
5
  activesupport (>= 5.0, < 7.0.0)
6
6
  gruf (~> 2.10)
7
7
  httprb-opentracing (~> 0.4.0)
@@ -10,20 +10,20 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (6.1.4.4)
14
- actionview (= 6.1.4.4)
15
- activesupport (= 6.1.4.4)
13
+ actionpack (6.1.6.1)
14
+ actionview (= 6.1.6.1)
15
+ activesupport (= 6.1.6.1)
16
16
  rack (~> 2.0, >= 2.0.9)
17
17
  rack-test (>= 0.6.3)
18
18
  rails-dom-testing (~> 2.0)
19
19
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
20
- actionview (6.1.4.4)
21
- activesupport (= 6.1.4.4)
20
+ actionview (6.1.6.1)
21
+ activesupport (= 6.1.6.1)
22
22
  builder (~> 3.1)
23
23
  erubi (~> 1.4)
24
24
  rails-dom-testing (~> 2.0)
25
25
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
26
- activesupport (6.1.4.4)
26
+ activesupport (6.1.6.1)
27
27
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
28
  i18n (>= 1.6, < 2)
29
29
  minitest (>= 5.1)
@@ -37,7 +37,7 @@ GEM
37
37
  bundler (>= 1.2.0, < 3)
38
38
  thor (~> 1.0)
39
39
  coderay (1.1.3)
40
- concurrent-ruby (1.1.9)
40
+ concurrent-ruby (1.1.10)
41
41
  crass (1.0.6)
42
42
  diff-lcs (1.4.4)
43
43
  docile (1.4.0)
@@ -49,22 +49,31 @@ GEM
49
49
  ffi-compiler (1.0.1)
50
50
  ffi (>= 1.0.0)
51
51
  rake
52
- google-protobuf (3.19.3)
53
- googleapis-common-protos-types (1.3.0)
52
+ google-protobuf (3.21.3)
53
+ google-protobuf (3.21.3-x86_64-darwin)
54
+ google-protobuf (3.21.3-x86_64-linux)
55
+ googleapis-common-protos-types (1.3.2)
54
56
  google-protobuf (~> 3.14)
55
- grpc (1.41.0)
56
- google-protobuf (~> 3.17)
57
+ grpc (1.48.0)
58
+ google-protobuf (~> 3.19)
57
59
  googleapis-common-protos-types (~> 1.0)
58
- grpc-tools (1.41.0)
59
- gruf (2.12.0)
60
+ grpc (1.48.0-x86_64-darwin)
61
+ google-protobuf (~> 3.19)
62
+ googleapis-common-protos-types (~> 1.0)
63
+ grpc (1.48.0-x86_64-linux)
64
+ google-protobuf (~> 3.19)
65
+ googleapis-common-protos-types (~> 1.0)
66
+ grpc-tools (1.48.0)
67
+ gruf (2.15.1)
60
68
  activesupport (> 4)
61
69
  concurrent-ruby (> 1)
62
70
  e2mmap (>= 0.1)
63
- grpc (~> 1.10, <= 1.41.0)
64
- grpc-tools (~> 1.10, <= 1.41.0)
71
+ grpc (~> 1.10)
72
+ grpc-tools (~> 1.10)
65
73
  json (>= 2.3)
66
74
  slop (>= 4.6)
67
75
  thwait (>= 0.1)
76
+ zeitwerk (>= 2)
68
77
  http (5.0.4)
69
78
  addressable (~> 2.8)
70
79
  http-cookie (~> 1.0)
@@ -77,56 +86,56 @@ GEM
77
86
  ffi-compiler (>= 1.0, < 2.0)
78
87
  httprb-opentracing (0.4.0)
79
88
  opentracing (~> 0.5.0)
80
- i18n (1.8.11)
89
+ i18n (1.12.0)
81
90
  concurrent-ruby (~> 1.0)
82
91
  jaeger-client (1.1.0)
83
92
  opentracing (~> 0.3)
84
93
  thrift
85
- json (2.6.1)
94
+ json (2.6.2)
86
95
  llhttp-ffi (0.4.0)
87
96
  ffi-compiler (~> 1.0)
88
97
  rake (~> 13.0)
89
- loofah (2.13.0)
98
+ loofah (2.18.0)
90
99
  crass (~> 1.0.2)
91
100
  nokogiri (>= 1.5.9)
92
101
  method_source (1.0.0)
93
- mini_portile2 (2.6.1)
94
- minitest (5.15.0)
95
- nokogiri (1.12.5)
96
- mini_portile2 (~> 2.6.1)
102
+ mini_portile2 (2.8.0)
103
+ minitest (5.16.2)
104
+ nokogiri (1.13.8)
105
+ mini_portile2 (~> 2.8.0)
97
106
  racc (~> 1.4)
98
- nokogiri (1.12.5-x86_64-darwin)
107
+ nokogiri (1.13.8-x86_64-darwin)
99
108
  racc (~> 1.4)
100
- nokogiri (1.12.5-x86_64-linux)
109
+ nokogiri (1.13.8-x86_64-linux)
101
110
  racc (~> 1.4)
102
111
  opentracing (0.5.0)
103
112
  opentracing_test_tracer (0.1.1)
104
113
  opentracing
105
- parallel (1.21.0)
106
- parser (3.0.3.2)
114
+ parallel (1.22.1)
115
+ parser (3.1.2.0)
107
116
  ast (~> 2.4.1)
108
117
  pry (0.14.1)
109
118
  coderay (~> 1.1)
110
119
  method_source (~> 1.0)
111
120
  public_suffix (4.0.6)
112
121
  racc (1.6.0)
113
- rack (2.2.3)
114
- rack-test (1.1.0)
115
- rack (>= 1.0, < 3)
122
+ rack (2.2.4)
123
+ rack-test (2.0.2)
124
+ rack (>= 1.3)
116
125
  rails-dom-testing (2.0.3)
117
126
  activesupport (>= 4.2.0)
118
127
  nokogiri (>= 1.6)
119
- rails-html-sanitizer (1.4.2)
128
+ rails-html-sanitizer (1.4.3)
120
129
  loofah (~> 2.3)
121
- railties (6.1.4.4)
122
- actionpack (= 6.1.4.4)
123
- activesupport (= 6.1.4.4)
130
+ railties (6.1.6.1)
131
+ actionpack (= 6.1.6.1)
132
+ activesupport (= 6.1.6.1)
124
133
  method_source
125
- rake (>= 0.13)
134
+ rake (>= 12.2)
126
135
  thor (~> 1.0)
127
- rainbow (3.0.0)
136
+ rainbow (3.1.1)
128
137
  rake (13.0.6)
129
- regexp_parser (2.2.0)
138
+ regexp_parser (2.5.0)
130
139
  rexml (3.2.5)
131
140
  rspec (3.10.0)
132
141
  rspec-core (~> 3.10.0)
@@ -141,37 +150,36 @@ GEM
141
150
  diff-lcs (>= 1.2.0, < 2.0)
142
151
  rspec-support (~> 3.10.0)
143
152
  rspec-support (3.10.3)
144
- rubocop (1.17.0)
153
+ rubocop (1.30.1)
145
154
  parallel (~> 1.10)
146
- parser (>= 3.0.0.0)
155
+ parser (>= 3.1.0.0)
147
156
  rainbow (>= 2.2.2, < 4.0)
148
157
  regexp_parser (>= 1.8, < 3.0)
149
- rexml
150
- rubocop-ast (>= 1.7.0, < 2.0)
158
+ rexml (>= 3.2.5, < 4.0)
159
+ rubocop-ast (>= 1.18.0, < 2.0)
151
160
  ruby-progressbar (~> 1.7)
152
161
  unicode-display_width (>= 1.4.0, < 3.0)
153
- rubocop-ast (1.15.0)
154
- parser (>= 3.0.1.1)
155
- rubocop-config-umbrellio (1.17.0.53)
156
- rubocop (= 1.17.0)
157
- rubocop-performance (= 1.10.0)
158
- rubocop-rails (= 2.9.1)
159
- rubocop-rake (= 0.5.1)
160
- rubocop-rspec (= 2.2.0)
161
- rubocop-sequel (= 0.2.0)
162
- rubocop-performance (1.10.0)
163
- rubocop (>= 0.90.0, < 2.0)
162
+ rubocop-ast (1.19.1)
163
+ parser (>= 3.1.1.0)
164
+ rubocop-config-umbrellio (1.30.0.65)
165
+ rubocop (~> 1.30.0)
166
+ rubocop-performance (~> 1.14.0)
167
+ rubocop-rails (~> 2.14.2)
168
+ rubocop-rake (~> 0.6.0)
169
+ rubocop-rspec (~> 2.11.1)
170
+ rubocop-sequel (~> 0.3.3)
171
+ rubocop-performance (1.14.3)
172
+ rubocop (>= 1.7.0, < 2.0)
164
173
  rubocop-ast (>= 0.4.0)
165
- rubocop-rails (2.9.1)
174
+ rubocop-rails (2.14.2)
166
175
  activesupport (>= 4.2.0)
167
176
  rack (>= 1.1)
168
- rubocop (>= 0.90.0, < 2.0)
169
- rubocop-rake (0.5.1)
170
- rubocop
171
- rubocop-rspec (2.2.0)
177
+ rubocop (>= 1.7.0, < 2.0)
178
+ rubocop-rake (0.6.0)
172
179
  rubocop (~> 1.0)
173
- rubocop-ast (>= 1.1.0)
174
- rubocop-sequel (0.2.0)
180
+ rubocop-rspec (2.11.1)
181
+ rubocop (~> 1.19)
182
+ rubocop-sequel (0.3.4)
175
183
  rubocop (~> 1.0)
176
184
  ruby-progressbar (1.11.0)
177
185
  simplecov (0.21.2)
@@ -181,18 +189,18 @@ GEM
181
189
  simplecov-html (0.12.3)
182
190
  simplecov-lcov (0.8.0)
183
191
  simplecov_json_formatter (0.1.3)
184
- slop (4.9.1)
185
- thor (1.1.0)
186
- thrift (0.15.0)
192
+ slop (4.9.2)
193
+ thor (1.2.1)
194
+ thrift (0.16.0)
187
195
  thwait (0.2.0)
188
196
  e2mmap
189
- tzinfo (2.0.4)
197
+ tzinfo (2.0.5)
190
198
  concurrent-ruby (~> 1.0)
191
199
  unf (0.1.4)
192
200
  unf_ext
193
201
  unf_ext (0.0.8)
194
- unicode-display_width (2.1.0)
195
- zeitwerk (2.5.1)
202
+ unicode-display_width (2.2.0)
203
+ zeitwerk (2.6.0)
196
204
 
197
205
  PLATFORMS
198
206
  ruby
@@ -215,4 +223,4 @@ DEPENDENCIES
215
223
  simplecov-lcov
216
224
 
217
225
  BUNDLED WITH
218
- 2.2.27
226
+ 2.2.31
@@ -7,12 +7,12 @@ module JCW
7
7
  IGNORED_PAYLOAD_KEYS = %i[request response headers exception exception_object].freeze
8
8
 
9
9
  def subscribe_to_event!(event)
10
- ActiveSupport::Notifications.subscribe(event) do |name, _start, _finish, _uid, payload|
11
- add(name, payload)
10
+ ActiveSupport::Notifications.subscribe(event) do |name, start, finish, _uid, payload|
11
+ add(name, payload, finish - start)
12
12
  end
13
13
  end
14
14
 
15
- def add(name, payload)
15
+ def add(name, payload, duration)
16
16
  # skip Rails internal events
17
17
  return if name.start_with?("!")
18
18
 
@@ -23,7 +23,10 @@ module JCW
23
23
  # we should only mutate the copy of the payload
24
24
  payload = payload.dup
25
25
  IGNORED_PAYLOAD_KEYS.each { |key| payload.delete(key) if payload.key?(key) }
26
+ else
27
+ payload = { payload: payload }
26
28
  end
29
+ payload[:duration] = duration
27
30
 
28
31
  span.log_kv(message: name, context: JSON.dump(payload))
29
32
  end
data/lib/jcw/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JCW
4
- VERSION = "0.2.4"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jcw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Starovojtov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-25 00:00:00.000000000 Z
11
+ date: 2022-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  - !ruby/object:Gem::Version
294
294
  version: '0'
295
295
  requirements: []
296
- rubygems_version: 3.1.6
296
+ rubygems_version: 3.3.7
297
297
  signing_key:
298
298
  specification_version: 4
299
299
  summary: Wrapper for jaeger-client