raygun-apm-rails 1.0.19 → 1.0.20

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: dc8275346199de493a2f17471d627e1b09cbe8ddebd5d61985e3d532eb95b440
4
- data.tar.gz: c219ea0ec08978efda1ca62b5b483d032288d90f13b777d77ebe40e49572c90a
3
+ metadata.gz: 274ea9a538eec6a7f3b33798485bb8a34e125d6b7656f6da6190b137d2a50667
4
+ data.tar.gz: e3083172f595177fbcca74e9206bb241c17f703e532ffb7c16d18322b75218a8
5
5
  SHA512:
6
- metadata.gz: 3733122e03f98a8daaff55d0bc04a8edb2ce1f0c9c9a4e74325bbec9467650250530a2dfb695be36d823dc24398f3ab468939e20d7d8040dadaaba25575a9e96
7
- data.tar.gz: c95b95fccb7f7c60181fe56683d1862899d111fbecac33c875f94a7ccda49d73df7e90e2a8376d881dc2b0f7ef61d30f307b17e1a51299ab6c867e47b3491f43
6
+ metadata.gz: 7ab24ef63ac928dc823e96181a1b1f5be51839f4b13646b07571686680eea2482dbedd0134e4959bcd4233d07ca8e6f80883308ba67922e11a2e77f3a9a9c9b5
7
+ data.tar.gz: '0988caffa77325919b9fb2d3d31bbc90229ecf424bc52686980f3c5a6953d9e67f54407f02550acc8073e118296512a372ffb476e032bdc471cd02b0b3d17322'
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.0.20 (March 18, 2020)
4
+
5
+ * Introduce support for detecting the presence of raygun4ruby and integrate better with the exception tracker
6
+
3
7
  == 1.0.19 (March 16, 2020)
4
8
 
5
9
  * Improve trace emission of unhandled exceptions in a request context
@@ -75,6 +75,10 @@ module Raygun
75
75
  +Raygun::Apm::Rails::Middleware::Ruby_APM_request_error
76
76
  +Raygun::track_exception
77
77
  }
78
+
79
+ def self.raygun4ruby?
80
+ defined?(Raygun) && Raygun.respond_to?(:configured?) && Raygun.configured?
81
+ end
78
82
  end
79
83
  end
80
84
  end
@@ -29,7 +29,11 @@ module Raygun
29
29
  begin
30
30
  res = @app.call(env)
31
31
  rescue => e
32
- Ruby_APM_request_error { exceptional_http_in_handler(env, 500) }
32
+ Ruby_APM_request_error do
33
+ Raygun.track_exception(e, env) if Raygun::Apm::Rails.raygun4ruby?
34
+ exceptional_http_in_handler(env, 500)
35
+ end
36
+ exection = e
33
37
  end
34
38
  end
35
39
  if res && (status = res.first) >= 400 && status < 600
@@ -37,6 +41,7 @@ module Raygun
37
41
  end
38
42
  # Can be nil if we had a fatal error
39
43
  @tracer.end_trace if @tracer
44
+ raise exception if exception
40
45
  res
41
46
  rescue Raygun::Apm::FatalError => e
42
47
  raygun_shutdown_handler(e)
@@ -6,6 +6,10 @@ module Raygun
6
6
  require "raygun/apm"
7
7
  require "raygun/apm/rails/middleware"
8
8
  Raygun::Apm::Blacklist.extend_with Raygun::Apm::Rails::BLACKLIST
9
+ if Raygun::Apm::Rails.raygun4ruby?
10
+ # Remove the exception notifier because we handle it in the APM middleware now instead
11
+ app.middleware.delete Raygun::Middleware::RackExceptionInterceptor
12
+ end
9
13
  app.middleware.use Raygun::Apm::Rails::Middleware
10
14
  # Explictly enable instrumenting HTTP until a good control API is figured out
11
15
  require "raygun/apm/hooks/net_http"
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.0.19"
4
+ VERSION = "1.0.20"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raygun
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-03-17 00:00:00.000000000 Z
12
+ date: 2020-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: raygun-apm