process_handler 2.2.0 → 2.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
  SHA1:
3
- metadata.gz: 18bd46cb222d715eb1f2d0000fabc2729e10f572
4
- data.tar.gz: 48142bddc135aff00600a45cf5953fa011d2f637
3
+ metadata.gz: 16ff070c1f4e04220f402a1269a7f2e41bd5f6ba
4
+ data.tar.gz: 551acbbe76055fff1fb1f49e1359d6a4e9eb48c5
5
5
  SHA512:
6
- metadata.gz: 2f70fec6cbc732807c28be56a8a76730dd5a009033314162ceec96a4d3c32844365db9b301e88d66bbef41f874c20025de3ed8b6375a29612bcc152669972335
7
- data.tar.gz: 3e22860d47e46de9d1d69e0f890580fae564c6890d9410129576b992efe30de6b5348e04e1aa7f2d67ee2f5372d6e328acdabffaf6f8f6a267bac625e83f032a
6
+ metadata.gz: 1da185b0c6a35a84a5989aaeebdc4ac72914f439999b8bce185f117f46400239c097b50238807a453d526042193b295ff85162c5156429cb688bc7a4b1a77d60
7
+ data.tar.gz: 42f98184302acd238e21ca550956fc47e78f4b7852c5bde1bad6f42679d897d4db3b769e0b619a3e41cc1134081357accdac6b4eb6a7ed99d222d31029966a25
@@ -12,20 +12,6 @@ module Salemove
12
12
 
13
13
  attr_reader :process_monitor, :exception_notifier
14
14
 
15
- def self.tracing_supported?
16
- defined?(Freddy) &&
17
- Freddy.respond_to?(:trace) &&
18
- Freddy.trace.context.respond_to?(:to_h)
19
- end
20
-
21
- def self.trace_information
22
- if tracing_supported?
23
- {trace: Freddy.trace.context.to_h}
24
- else
25
- {}
26
- end
27
- end
28
-
29
15
  def initialize(freddy:,
30
16
  logger:,
31
17
  statsd:,
@@ -117,7 +103,7 @@ module Salemove
117
103
  end
118
104
 
119
105
  def delegate_to_service(input)
120
- @logger.info 'Received request', PivotProcess.trace_information.merge(input)
106
+ @logger.info 'Received request', input
121
107
  @benchmarker.call(input) { @service.call(input) }
122
108
  rescue StandardError => exception
123
109
  handle_exception(exception, input)
@@ -125,9 +111,7 @@ module Salemove
125
111
 
126
112
  def handle_exception(exception, input)
127
113
  message = [exception.inspect, *exception.backtrace].join("\n")
128
- metadata = PivotProcess.trace_information.merge(input)
129
-
130
- @logger.error(message, metadata)
114
+ @logger.error(message, input)
131
115
 
132
116
  if @exception_notifier
133
117
  @exception_notifier.notify_or_ignore(
@@ -187,7 +171,7 @@ module Salemove
187
171
  end
188
172
 
189
173
  def handle_request(input)
190
- @logger.info 'Received request', PivotProcess.trace_information.merge(input)
174
+ @logger.info 'Received request', input
191
175
  if input.has_key?(:ping)
192
176
  { success: true, pong: 'pong' }
193
177
  else
@@ -211,7 +195,6 @@ module Salemove
211
195
  attributes = result
212
196
  .select { |k, _| PROCESSED_REQUEST_LOG_KEYS.include?(k) }
213
197
  .merge(input)
214
- .merge(PivotProcess.trace_information)
215
198
 
216
199
  if @log_error_as_string
217
200
  attributes[:error] = attributes[:error].to_s if attributes.has_key?(:error)
@@ -222,9 +205,7 @@ module Salemove
222
205
 
223
206
  def handle_exception(exception, input)
224
207
  message = [exception.inspect, *exception.backtrace].join("\n")
225
- metadata = PivotProcess.trace_information.merge(input)
226
-
227
- @logger.error(message, metadata)
208
+ @logger.error(message, input)
228
209
 
229
210
  if @exception_notifier
230
211
  @exception_notifier.notify_or_ignore(
@@ -1,5 +1,5 @@
1
1
  module Salemove
2
2
  module ProcessHandler
3
- VERSION = '2.2.0'
3
+ VERSION = '2.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SaleMove TechMovers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake