raygun-apm-rails 1.1.1 → 1.1.2
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 +8 -1
- 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: 37bbd014edd21ac021ef27ce2c2c1237b4929fa7ab97932eb846f0ed95a741bb
|
4
|
+
data.tar.gz: d727c1e6fb3a93d242aa0331c9db3cba4e1e827d823895bef83152c526a10390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee47a2ac3b3b92c3794c872b7117a0d7dd3139915bdb472cd6f22656f18215a69602ccfbc880585a7da4a3d4c69a64fa825bd9db7588c8f93b513af14c3a77f
|
7
|
+
data.tar.gz: d3763e1a6ed7ab227c07bb131355c3a1fe2639f94dfe7b9173e5c3cc3d857acb2d42a97562a08560b0a5c75dc745d2e6c929ecb53194592cdbcacc2a7af79858
|
@@ -103,7 +103,7 @@ module Raygun
|
|
103
103
|
event[:pid] = Process.pid
|
104
104
|
event[:url] = url
|
105
105
|
event[:verb] = verb
|
106
|
-
event[:status] = notification
|
106
|
+
event[:status] = http_in_status(notification)
|
107
107
|
# XXX constant milliseconds to microseconds
|
108
108
|
event[:duration] = notification.duration * 1000
|
109
109
|
event[:timestamp] = @tracer.now
|
@@ -114,6 +114,13 @@ module Raygun
|
|
114
114
|
raygun_shutdown_handler(e)
|
115
115
|
end
|
116
116
|
|
117
|
+
def http_in_status(notification)
|
118
|
+
notification.payload[:status] || notification.payload[:headers]["action_controller.instance"].status
|
119
|
+
rescue
|
120
|
+
warn "[Raygun APM] error inferring HTTP status, fallback to 200"
|
121
|
+
200
|
122
|
+
end
|
123
|
+
|
117
124
|
# For middleware chain halts that does not trigger 'process_action.action_controller'
|
118
125
|
def exceptional_http_in_handler(env)
|
119
126
|
req = Rack::Request.new env
|
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: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun Limited
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raygun-apm
|