api_hammer 0.10.1 → 0.10.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: b41ef07f4c73f84a3cfe8fdac358d1ece98d17ce
4
- data.tar.gz: 017b83a9e6816f49c0909ac9c504158b3260c967
3
+ metadata.gz: e22063457c4fd23dcfacf1dd263bb86bed720da4
4
+ data.tar.gz: 59d655dfeb7c3521bda18fa73cc58da1a0cee266
5
5
  SHA512:
6
- metadata.gz: 46bfab9803d2e119740a1e9424c174a41bb75d6af16ae9f7d24f0b371e40693585313c4fa06bc1e5cca1d9434018f7e2daf048661bb1e4888a6e029a048deae2
7
- data.tar.gz: f44d7b86122b1277c0cbfb88531417570fbf8f41e12080b3c9dcf9be669235b725db0fe0a80de7885cdcfa15f4ba38c523663d4562128c5c1da17298d77d313d
6
+ metadata.gz: e26ef7aec22dc8114044bb52947d3d1a49e00395ae45c80feb6903487385f3db6bf4f0871c32558e943cc7a77d85358d9d705695c9ae2a5acec9d25ad41eb76e
7
+ data.tar.gz: 7b0d75819bfd4c637d24a0ee74cea82e589b3ac3d5f767129a7ac43b4370cb44fb0d4df01d5398f7324b5f4a1805a4cbc6727a19456f1c5cc2bb34373b1bec09
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.10.2
2
+ - rails request logging logs exception backtrace
3
+
1
4
  # v0.10.1
2
5
  - Rack RequestLogger works around rails' exception app path mangling
3
6
 
@@ -28,6 +28,17 @@ module ApiHammer
28
28
  info.update(event.payload.slice(:controller, :action, :exception, :format, :formats, :view_runtime, :db_runtime))
29
29
  info.update(:transaction_id => event.transaction_id)
30
30
  info.update(event.payload['request_logger.info']) if event.payload['request_logger.info']
31
+ # if there is an exception, ActiveSupport saves the class and message but not backtrace. but this
32
+ # gets called from an ensure block, so $! is set - retrieve the backtrace from that.
33
+ if $!
34
+ # this may be paranoid - it should always be the case that what gets set in :exception is the
35
+ # same as the current error, but just in case it's not, we'll put the current error somewhere else
36
+ if info[:exception] == [$!.class.to_s, $!.message]
37
+ info[:exception] += [$!.backtrace]
38
+ else
39
+ info[:current_exception] = [$!.class.to_s, $!.message, $!.backtrace]
40
+ end
41
+ end
31
42
  end
32
43
  end
33
44
  end
@@ -1,3 +1,3 @@
1
1
  module ApiHammer
2
- VERSION = "0.10.1"
2
+ VERSION = "0.10.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_hammer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack