appsignal 1.1.7.beta.1 → 1.1.7.beta.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
  SHA1:
3
- metadata.gz: 087f237fab88ce1726739ad3f08b7497e2e3f934
4
- data.tar.gz: 3af658ab3c053d97e8913089069516304827d546
3
+ metadata.gz: 4f47709f67e4bd21df3a400e5e70d5df5ee0b10e
4
+ data.tar.gz: af8475cfb56df26e95a2a5743c77b2bf5ff8cb94
5
5
  SHA512:
6
- metadata.gz: c04140d7906580a8f06b8f2bbe9208264430b7c56ec283788ca8a27f6022a5be6cd8c2d386f0c6435f01d7cba68befc3ffc4ec422d5eb1184c552e0665b94804
7
- data.tar.gz: 50b2e595b29ebc9014601a04073f082ff312412886335cc185919ea3b2ad1ca4714ca903feb98002e1360233c07957c5fbf50f7fa4f974756edbd71a9e462ea5
6
+ metadata.gz: 5a884979549fe5c0681f749cd476cf7e3843c096220a05feaa500523d5407f13b5c6bd8fd65fd86be132f5951983a863cde21956610a750353dc82b42c244306
7
+ data.tar.gz: a24668beb6e573fd03d1db669701c94281fd65d52b6b4a791ae9c0d24b8365579128bc758b1da210467e539980c3f8e256ef7c681e22963d7fe11c629a81f858
@@ -1,6 +1,7 @@
1
1
  # 1.1.7
2
2
  * Make logging resilient for closing FD's (daemons gem does this)
3
3
  * Add support for using Resque through ActiveJob
4
+ * Rescue more expections in json generation
4
5
 
5
6
  # 1.1.6
6
7
  * Generic Rack instrumentation middleware
@@ -188,7 +188,7 @@ module Appsignal
188
188
  def merge(original_config, new_config)
189
189
  new_config.each do |key, value|
190
190
  unless original_config[key].nil?
191
- @logger.info("Config key '#{key}' is being overwritten")
191
+ @logger.debug("Config key '#{key}' is being overwritten")
192
192
  end
193
193
  original_config[key] = value
194
194
  end
@@ -45,8 +45,8 @@ module Appsignal
45
45
  key.to_s,
46
46
  Appsignal::Utils.json_generate(data)
47
47
  )
48
- rescue JSON::GeneratorError=>e
49
- Appsignal.logger.error("JSON generate error (#{e.message}) for '#{data.inspect}'")
48
+ rescue *Appsignal::Transaction::JSON_EXCEPTIONS => e
49
+ Appsignal.logger.error("Error generating JSON (#{e.class}: #{e.message}) for '#{backtrace.inspect}'")
50
50
  end
51
51
  end
52
52
  end
@@ -13,7 +13,14 @@ module Appsignal
13
13
  HTTP_X_QUEUE_TIME HTTP_X_HEROKU_QUEUE_WAIT_TIME HTTP_X_APPLICATION_START
14
14
  HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE
15
15
  HTTP_CACHE_CONTROL HTTP_CONNECTION HTTP_USER_AGENT HTTP_FROM HTTP_NEGOTIATE
16
- HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR HTTP_CLIENT_IP).freeze
16
+ HTTP_PRAGMA HTTP_REFERER HTTP_X_FORWARDED_FOR HTTP_CLIENT_IP HTTP_RANGE)
17
+
18
+ JSON_EXCEPTIONS = [
19
+ IOError,
20
+ NotImplementedError,
21
+ JSON::GeneratorError,
22
+ Encoding::UndefinedConversionError
23
+ ].freeze
17
24
 
18
25
  class << self
19
26
  def create(id, namespace, request, options={})
@@ -128,8 +135,8 @@ module Appsignal
128
135
  key.to_s,
129
136
  Appsignal::Utils.json_generate(data)
130
137
  )
131
- rescue JSON::GeneratorError=>e
132
- Appsignal.logger.error("JSON generate error (#{e.message}) for '#{data.inspect}'")
138
+ rescue *JSON_EXCEPTIONS => e
139
+ Appsignal.logger.error("Error generating JSON (#{e.class}: #{e.message}) for '#{data.inspect}'")
133
140
  end
134
141
 
135
142
  def sample_data
@@ -156,8 +163,8 @@ module Appsignal
156
163
  error.message.to_s,
157
164
  backtrace ? Appsignal::Utils.json_generate(backtrace) : ''
158
165
  )
159
- rescue JSON::GeneratorError=>e
160
- Appsignal.logger.error("JSON generate error (#{e.message}) for '#{backtrace.inspect}'")
166
+ rescue *JSON_EXCEPTIONS => e
167
+ Appsignal.logger.error("Error generating JSON (#{e.class}: #{e.message}) for '#{backtrace.inspect}'")
161
168
  end
162
169
  alias_method :add_exception, :set_error
163
170
 
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
2
 
3
3
  module Appsignal
4
- VERSION = '1.1.7.beta.1'
4
+ VERSION = '1.1.7.beta.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7.beta.1
4
+ version: 1.1.7.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-13 00:00:00.000000000 Z
12
+ date: 2016-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack