raygun-apm-rails 1.0.22 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +21 -0
- data/Gemfile.lock +5 -5
- data/README.rdoc +1 -2
- data/lib/raygun/apm/rails.rb +9 -1
- data/lib/raygun/apm/rails/middleware.rb +20 -16
- data/lib/raygun/apm/rails/version.rb +1 -1
- data/raygun-apm-rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 260710ffbf3750e8dbcff40981aa042d6513c95ddd737c457b5c18a62c04d14f
|
4
|
+
data.tar.gz: 354e9620e863868d9cefa2693a271b1c260592bc162325d086cfd54884865efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75d8c4ff6cb0c65182aa6db99abdef0da3c02da9cf8781157de4a596948abe3f39b739d30f70c72bb0b2763f18d27e576cbf8ab360a2d04956b9d895449548e4
|
7
|
+
data.tar.gz: 22e9a61b8c53a5a89e62fad4d0de5bbbce38cf43e26340d5b70f9fb0455df3744ed9a97c28667f2f9d961297eda09dcb41f25efc2261ee9e95d39dca63e49d86
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
|
+
== 1.0.27 (April 11, 2020)
|
4
|
+
|
5
|
+
* Restore Rails 4 support with caveat that HTTP IN paths are not fully qualified with protocol, host and port
|
6
|
+
|
7
|
+
== 1.0.26 (April 11, 2020)
|
8
|
+
|
9
|
+
* Remove Rails 4 support (no headers element in the notifications hash for HTTP in)
|
10
|
+
|
11
|
+
== 1.0.25 (April 11, 2020)
|
12
|
+
|
13
|
+
* Only ever attempt to emit extended events if a tracer instance is alive
|
14
|
+
|
15
|
+
== 1.0.24 (April 1, 2020)
|
16
|
+
|
17
|
+
* Blacklist Enumeration
|
18
|
+
* Unsubscribe from previously registered AS::Notifications subscribers as child processes emit double HTTP IN and SQL events otherwise
|
19
|
+
|
20
|
+
== 1.0.23 (March 25, 2020)
|
21
|
+
|
22
|
+
* Do not cache PID on HTTP IN and SQL event initializers
|
23
|
+
|
3
24
|
== 1.0.22 (March 24, 2020)
|
4
25
|
|
5
26
|
* Fix local variable typo in the Rails middleware
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
raygun-apm-rails (
|
5
|
-
raygun-apm (~>
|
4
|
+
raygun-apm-rails (1.0.27)
|
5
|
+
raygun-apm (~> 1.0.15)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
minitest (5.13.0)
|
11
11
|
rake (10.5.0)
|
12
|
-
raygun-apm (
|
12
|
+
raygun-apm (1.0.29-universal-darwin)
|
13
13
|
|
14
14
|
PLATFORMS
|
15
15
|
ruby
|
16
16
|
|
17
17
|
DEPENDENCIES
|
18
|
-
bundler (~> 1.
|
18
|
+
bundler (~> 2.1.4)
|
19
19
|
minitest (~> 5.0)
|
20
20
|
rake (~> 10.0)
|
21
21
|
raygun-apm-rails!
|
22
22
|
|
23
23
|
BUNDLED WITH
|
24
|
-
1.
|
24
|
+
2.1.4
|
data/README.rdoc
CHANGED
data/lib/raygun/apm/rails.rb
CHANGED
@@ -17,7 +17,7 @@ module Raygun
|
|
17
17
|
def instrument(env)
|
18
18
|
res = nil
|
19
19
|
# Can be nil if we had a fatal error
|
20
|
-
@tracer
|
20
|
+
@tracer = Raygun::Apm::Tracer.instance || init_tracer
|
21
21
|
if @tracer
|
22
22
|
# For the exceptional HTTP IN handler
|
23
23
|
@request_started = @tracer.now
|
@@ -36,14 +36,14 @@ module Raygun
|
|
36
36
|
rescue => e
|
37
37
|
Raygun.track_exception(e, env) if Raygun::Apm::Rails.raygun4ruby?
|
38
38
|
end
|
39
|
-
exceptional_http_in_handler(env, status)
|
39
|
+
exceptional_http_in_handler(env, status) if @tracer
|
40
40
|
end
|
41
41
|
end
|
42
42
|
rescue => e
|
43
43
|
Ruby_APM_request_error do
|
44
44
|
raise e rescue nil
|
45
45
|
Raygun.track_exception(e, env) if Raygun::Apm::Rails.raygun4ruby?
|
46
|
-
exceptional_http_in_handler(env, 500)
|
46
|
+
exceptional_http_in_handler(env, 500) if @tracer
|
47
47
|
end
|
48
48
|
exception = e
|
49
49
|
end
|
@@ -62,12 +62,14 @@ module Raygun
|
|
62
62
|
tracer.process_started
|
63
63
|
ObjectSpace.define_finalizer(self, self.class.finalize(tracer))
|
64
64
|
|
65
|
+
ActiveSupport::Notifications.unsubscribe(@http_in_subscriber) if @http_in_subscriber
|
65
66
|
@http_in_subscriber = ActiveSupport::Notifications.subscribe('process_action.action_controller') do |*args|
|
66
|
-
http_in_handler(args)
|
67
|
+
http_in_handler(args) if @tracer
|
67
68
|
end
|
68
69
|
|
70
|
+
ActiveSupport::Notifications.unsubscribe(@sql_subscriber) if @sql_subscriber
|
69
71
|
@sql_subscriber = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
|
70
|
-
sql_handler(args)
|
72
|
+
sql_handler(args) if @tracer
|
71
73
|
end
|
72
74
|
|
73
75
|
GC.stress = true if ENV['RAYGUN_STRESS_GC']
|
@@ -93,8 +95,16 @@ module Raygun
|
|
93
95
|
if notification.payload[:exception]
|
94
96
|
return
|
95
97
|
end
|
96
|
-
|
98
|
+
if headers = notification.payload[:headers]
|
99
|
+
req = Rack::Request.new headers.env
|
100
|
+
url = req.url
|
101
|
+
verb = req.request_method
|
102
|
+
else
|
103
|
+
url = notification.payload[:path]
|
104
|
+
verb = notification.payload[:method].to_s.upcase
|
105
|
+
end
|
97
106
|
event = http_in_event
|
107
|
+
event[:pid] = Process.pid
|
98
108
|
event[:url] = req.url
|
99
109
|
event[:verb] = req.request_method
|
100
110
|
event[:status] = notification.payload[:status]
|
@@ -112,6 +122,7 @@ module Raygun
|
|
112
122
|
def exceptional_http_in_handler(env, status)
|
113
123
|
req = Rack::Request.new env
|
114
124
|
event = http_in_event
|
125
|
+
event[:pid] = Process.pid
|
115
126
|
event[:url] = req.url
|
116
127
|
event[:verb] = req.request_method
|
117
128
|
event[:status] = status
|
@@ -125,11 +136,7 @@ module Raygun
|
|
125
136
|
end
|
126
137
|
|
127
138
|
def http_in_event
|
128
|
-
@http_in_event ||=
|
129
|
-
event = Raygun::Apm::Event::HttpIn.new
|
130
|
-
event[:pid] = Process.pid
|
131
|
-
event
|
132
|
-
end
|
139
|
+
@http_in_event ||= Raygun::Apm::Event::HttpIn.new
|
133
140
|
end
|
134
141
|
|
135
142
|
def sql_handler(args)
|
@@ -140,6 +147,7 @@ module Raygun
|
|
140
147
|
ObjectSpace._id2ref(notification.payload[:connection_id])
|
141
148
|
end
|
142
149
|
event = sql_event
|
150
|
+
event[:pid] = Process.pid
|
143
151
|
event[:query] = notification.payload[:sql]
|
144
152
|
|
145
153
|
# XXX this is hacky
|
@@ -160,11 +168,7 @@ module Raygun
|
|
160
168
|
end
|
161
169
|
|
162
170
|
def sql_event
|
163
|
-
@sql_event ||=
|
164
|
-
event = Raygun::Apm::Event::Sql.new
|
165
|
-
event[:pid] = Process.pid
|
166
|
-
event
|
167
|
-
end
|
171
|
+
@sql_event ||= Raygun::Apm::Event::Sql.new
|
168
172
|
end
|
169
173
|
|
170
174
|
def Ruby_APM_profiler_trace
|
data/raygun-apm-rails.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
23
|
spec.add_dependency "raygun-apm", "~> 1.0.15"
|
24
|
-
spec.add_development_dependency "bundler", "~> 1.
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.1.4"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: raygun-apm
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 2.1.4
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 2.1.4
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|