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 +4 -4
- data/lib/raygun/apm/sidekiq/middleware.rb +8 -6
- data/lib/raygun/apm/sidekiq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fefe846c47005d570447dd05aaf91d12d8b96c8e2a438b7c7adad0a10a493c1
|
4
|
+
data.tar.gz: 623e1e4cac445ccc7b35406194f7ff9ffd5b0f675f205d45d4342346a8912633
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
27
|
+
exception = nil
|
28
28
|
start_of_trace do
|
29
29
|
yield
|
30
|
-
rescue
|
31
|
-
|
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,
|
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,
|
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] =
|
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)
|
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.
|
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.
|
105
|
+
rubygems_version: 3.0.3
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Raygun application performance monitoring for Sidekiq
|