rollbar 0.12.9 → 0.12.10

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
  SHA1:
3
- metadata.gz: 8af9c1cd4fe9adc621acb5a44240c0b61a2a2177
4
- data.tar.gz: 57a3478b9a9299769e04de690e43ece7c81ab836
3
+ metadata.gz: 88ac00441d336613c80d821e682e4e8c5250cbd4
4
+ data.tar.gz: d6441c75660074ac8aa6b2108cd2a6f20bff35d8
5
5
  SHA512:
6
- metadata.gz: 3f77c6c4fae2a8d82ee381762d14fcceedb9ad8c764100a37dcec330858e304a21938b27869c53f07d070dbdc30bb9d766034756ba5477f2b6fb6b9295b36e14
7
- data.tar.gz: 82112483b0e51c31c6646de253ad349e7246b4d3420ad58e5d1cb928a87e6f3395a601afccd9cf531f0b29c3097c1974c8f3107a1a042961de2f89d04d197323
6
+ metadata.gz: 68bbecf026c56a3320a84cf58af48a5ef9b5d42b7c13e10fe5c0ceba680419d6fb61ce5babcffb51b92e17449d8eb6c1db65eab86b6a4d263393f4d178938ab9
7
+ data.tar.gz: c5798afb37d2f45b8de7b05c6052d97742bc5a31ecd78e850bcdb5d1326426a26e0f2c7c392d9d450c0ddfdadc651a4597e054a90409c4b9d17a8195e22b6549
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ **0.12.10**
4
+ - Log payloads that are too large to be sent to Rollbar
5
+ - Don't record controller context if request route info isn't readily available (ex. non-Rails)
6
+
3
7
  **0.12.9**
4
8
  - Fixed delayed job regression introduced in 0.12.5 by re-raising caught exceptions
5
9
  - Removed Active Support call introduced in 0.12.6 to remove rails dependency in `report_exception`
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Rollbar, Inc.
1
+ Copyright (c) 2014 Rollbar, Inc.
2
2
 
3
3
  MIT License
4
4
 
data/lib/rollbar.rb CHANGED
@@ -88,7 +88,12 @@ module Rollbar
88
88
  data = exception_data(exception, level ? level : filtered_level(exception))
89
89
  if request_data
90
90
  if request_data[:route]
91
- data[:context] = "#{request_data[:route][:controller]}" + '#' + "#{request_data[:route][:action]}"
91
+ route = request_data[:route]
92
+
93
+ # make sure route is a hash built by RequestDataExtractor in rails apps
94
+ if route.is_a?(Hash) and not route.empty?
95
+ data[:context] = "#{request_data[:route][:controller]}" + '#' + "#{request_data[:route][:action]}"
96
+ end
92
97
  end
93
98
 
94
99
  request_data[:env].reject!{|k, v| v.is_a?(IO) } if request_data[:env]
@@ -368,6 +373,7 @@ module Rollbar
368
373
  break
369
374
  elsif i == thresholds.length - 1
370
375
  send_failsafe('Could not send payload due to it being too large after truncating attempts', nil)
376
+ log_error "[Rollbar] Payload too large to be sent: #{MultiJson.dump(payload)}"
371
377
  return
372
378
  end
373
379
  end
@@ -99,12 +99,16 @@ module Rollbar
99
99
  end
100
100
 
101
101
  def rollbar_route_params(env)
102
- route = ::Rails.application.routes.recognize_path(env['PATH_INFO']) rescue {}
103
- {
104
- :controller => route[:controller],
105
- :action => route[:action],
106
- :format => route[:format]
107
- }
102
+ begin
103
+ route = ::Rails.application.routes.recognize_path(env['PATH_INFO'])
104
+ {
105
+ :controller => route[:controller],
106
+ :action => route[:action],
107
+ :format => route[:format]
108
+ }
109
+ rescue
110
+ {}
111
+ end
108
112
  end
109
113
 
110
114
  def rollbar_request_cookies(rack_req)
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "0.12.9"
2
+ VERSION = "0.12.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.9
4
+ version: 0.12.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Rue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json