raygun-apm-rails 0.1.17 → 0.1.18
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/rails/middleware.rb +13 -7
- data/lib/raygun/apm/rails/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: b32dbda41f5ec97d4087eeb129cf4e931c8c836a028aac5aa44d3f1d7d4f8107
|
4
|
+
data.tar.gz: c31b24a26171d71c30fa745a74a749ab72c98275aa26f736bb4d67fe8b927f33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a7ee9fab13361fa65fc5eb18d24e39bad80497c9c46255a1bc8b105ba903d81dfa7b2a0eccbc34a7000f274b3ec443a32926c5d2c6029bd969d1e6c28cd5455
|
7
|
+
data.tar.gz: 5b51e1e1b60bdca91f7faa8be9f7ab4eea2237e17d3bc6e37afcac77f7bd7e205118c6470af3353792d6bfb5c39a5892e714220d66b5583d6c82ebf5b79bb9fb
|
@@ -41,17 +41,17 @@ module Raygun
|
|
41
41
|
raygun_shutdown_handler(e)
|
42
42
|
end
|
43
43
|
|
44
|
-
def start_of_trace
|
45
|
-
yield
|
46
|
-
end
|
47
|
-
|
48
44
|
def raygun_shutdown_handler(exception)
|
49
|
-
warn "Raygun APM shutting down due to error -
|
45
|
+
warn "[Raygun APM] shutting down due to error - #{exception.message}",
|
50
46
|
# Kill extended event subcriptions
|
51
47
|
ActiveSupport::Notifications.unsubscribe(@http_in_subscriber)
|
52
48
|
ActiveSupport::Notifications.unsubscribe(@sql_subscriber)
|
49
|
+
warn "[Raygun APM] notification hooks unsubscribed"
|
53
50
|
# Shutdown the tracepoint if enabled to reduce any overhead and stall emission
|
54
|
-
|
51
|
+
if @tracer.tracepoint.enabled?
|
52
|
+
@tracer.tracepoint.stop
|
53
|
+
warn "[Raygun APM] tracepoint stopped"
|
54
|
+
end
|
55
55
|
# Let the GC clean up the sink thread through the finalizer below
|
56
56
|
@tracer = nil
|
57
57
|
Thread.current.thread_variable_set(:_raygun_apm_tracer, nil)
|
@@ -70,11 +70,12 @@ module Raygun
|
|
70
70
|
event[:status] = notification.payload[:status]
|
71
71
|
# XXX constant milliseconds to microseconds
|
72
72
|
event[:duration] = notification.duration * 1000
|
73
|
-
event[:timestamp] =
|
73
|
+
event[:timestamp] = @tracer.now
|
74
74
|
event[:tid] = @tracer.get_thread_id(Thread.current)
|
75
75
|
@tracer.emit(event)
|
76
76
|
rescue => e
|
77
77
|
warn "[Raygun APM] error reporting HTTP IN event"
|
78
|
+
raygun_shutdown_handler(e)
|
78
79
|
end
|
79
80
|
|
80
81
|
def http_in_event
|
@@ -109,6 +110,7 @@ module Raygun
|
|
109
110
|
@tracer.emit(event)
|
110
111
|
rescue => e
|
111
112
|
warn "[Raygun APM] error reporting SQL event"
|
113
|
+
raygun_shutdown_handler(e)
|
112
114
|
end
|
113
115
|
|
114
116
|
def sql_event
|
@@ -119,6 +121,10 @@ module Raygun
|
|
119
121
|
end
|
120
122
|
end
|
121
123
|
|
124
|
+
def start_of_trace
|
125
|
+
yield
|
126
|
+
end
|
127
|
+
|
122
128
|
def self.finalize(tracer)
|
123
129
|
proc {tracer.process_ended}
|
124
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erkki Eilonen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raygun-apm
|