raygun-apm-sidekiq 1.0.0 → 1.0.1

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: 077f9679377d70bdf9e2eafe8a65d7c1b6bb09225ed69766f3858e21b0cb8fe7
4
- data.tar.gz: 1e9aaa717e0a2889d776b53a0bea31e9eb3bed9901b73a8d07cdf1f8476fcc15
3
+ metadata.gz: 9fefe846c47005d570447dd05aaf91d12d8b96c8e2a438b7c7adad0a10a493c1
4
+ data.tar.gz: 623e1e4cac445ccc7b35406194f7ff9ffd5b0f675f205d45d4342346a8912633
5
5
  SHA512:
6
- metadata.gz: 306d5d3c458e67a32727d2f09b435519ff0d9a6437750eeae249ee8abe78df7c5d95d794ac81a5e7330532d60f7ded7524ad7ee954d890fc6760480241f9ce23
7
- data.tar.gz: 16aaca40a45458cb87f627b1b827c54b1ce4498671b1fde588c387f0f969f029b3008f77e8365cf6129f66b354f840863e1721367b00e52d8cb43a17faf0c4cb
6
+ metadata.gz: 6e62bcf69a209296784af96e23607a095cac470abbbed0d381a87ab7b83e7c367ec87f6b8aa57c16f410dd40932f7d55c444ee600a2ec3192093a204777e0593
7
+ data.tar.gz: 622da82a8a9ec3e16c875430c4c58b98e612b118309f1922f886d642784ec340140ae4e4750ba669ca307d41af7c8e9725356738f09a049dafc78d078937a706
@@ -24,15 +24,15 @@ module Raygun
24
24
  Thread.current.thread_variable_set(:_raygun_apm_tracer, @tracer)
25
25
  @tracer.start_trace
26
26
  end
27
- errored = false
27
+ exception = nil
28
28
  start_of_trace do
29
29
  yield
30
- rescue
31
- errored = true
30
+ rescue => e
31
+ exception = e
32
32
  end
33
33
  # Can be nil if we had a fatal error
34
34
  if @tracer
35
- fake_http_in_handler(started, worker_instance, msg, queue, errored)
35
+ fake_http_in_handler(started, worker_instance, msg, queue, exception)
36
36
  @tracer.end_trace
37
37
  end
38
38
  rescue Raygun::Apm::FatalError => e
@@ -52,17 +52,19 @@ module Raygun
52
52
  # Let the GC clean up the sink thread through the finalizer below
53
53
  @tracer = nil
54
54
  Thread.current.thread_variable_set(:_raygun_apm_tracer, nil)
55
+ unless (Raygun::Apm::FatalError === exception) raise(exception)
55
56
  end
56
57
 
57
- def fake_http_in_handler(started, worker_instance, msg, queue, errored)
58
+ def fake_http_in_handler(started, worker_instance, msg, queue, exception)
58
59
  ended = @tracer.now
59
60
  event = http_in_event
60
61
  event[:url] = "sidekiq://#{queue}/#{msg["class"]}?#{msg["jid"]}"
61
- event[:status] = errored ? 500 : 200
62
+ event[:status] = exception ? 500 : 200
62
63
  event[:duration] = ended - started
63
64
  event[:timestamp] = @tracer.now
64
65
  event[:tid] = @tracer.get_thread_id(Thread.current)
65
66
  @tracer.emit(event)
67
+ if (exception) raise(exception)
66
68
  rescue => e
67
69
  warn "[Raygun APM] error reporting HTTP IN event"
68
70
  raygun_shutdown_handler(e)
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Sidekiq
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erkki Eilonen
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.0.6
105
+ rubygems_version: 3.0.3
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Raygun application performance monitoring for Sidekiq