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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fd600a0cf6ff91eb1811e1e5fc347abdc035f87bd7d56ca637dd26d5713382d
4
- data.tar.gz: 72a599e8f61a4a44dea61f7184e2ccaad2c623367544052fc754592baa2d4218
3
+ metadata.gz: 37bbd014edd21ac021ef27ce2c2c1237b4929fa7ab97932eb846f0ed95a741bb
4
+ data.tar.gz: d727c1e6fb3a93d242aa0331c9db3cba4e1e827d823895bef83152c526a10390
5
5
  SHA512:
6
- metadata.gz: beac4f57fedaa8760d871a589a3e4105a99327cf138c9a5c13047525b58cb7bebfc66cf9c07fa65d36e9c26aabe54f87cc8ece6fa6ea1d9b5816122ca48913fa
7
- data.tar.gz: 164a0948df7229af3a2555608328174affac04eca80336e528bfaf5dc102fcc9917023501bf1987bc82c294ed60e0b980cbc093644c8d9de857569fb1bc82a0a
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.payload[:status] || notification.payload[:headers]["action_controller.instance"].status
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
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
6
6
  end
7
7
  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: 1.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-05-23 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: raygun-apm