raygun-apm-rails 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56652e1a7f4025972adeff71e48d15e0c9de9160b594c317a0542cbbb755dd68
4
- data.tar.gz: 9d5ecc225f6ff015b355847336b536a6c753b86b376f7a0122d31beaa1501103
3
+ metadata.gz: 79c1cf537ee9e8f781c49e3c2cc6cc74b8b38225e50e34bca773cae3cfdbc6b1
4
+ data.tar.gz: 5bd799bfa20772be1aa736220be6bb9efbfdc0aeb07d6b5c84a24b9d3bda0ac5
5
5
  SHA512:
6
- metadata.gz: 9920374e2efa710d18f2bd877ef3a9a583eda90fb3b6e5cb1f0cfc2f6cf4c84ea0876c67a0cc4714488d6658db3865e5d8716755941b15abe2cfe73cd5f92371
7
- data.tar.gz: a5da42a667bf6affb31abb3d9e9390ed1dd9bb7164b6d1d63e7dd263d218377228ff98e955617fb3eea10c25d194339cd34e01c98d2d8a458f317f866232f653
6
+ metadata.gz: a9770fa4db4c1b7d7bdb1a3a404a84d57587f61fe68466cff9c11440396ce59d21a05fe26184b2e4ed5b229eaf6d50af6b801f72353a746d2e044624ea58686d
7
+ data.tar.gz: a2282067547e6e0d0928f2c9269d97331ba98224d6f6078ded343a4e953ebc874f74aa9e5374fde64a4294958e5e4f16d939405f4fe4c7b60a5032fb8cf72330
@@ -4,17 +4,6 @@ module Raygun
4
4
  class Middleware
5
5
  def initialize(app)
6
6
  @app = app
7
- @tracer_initialized = nil
8
- end
9
-
10
- def call(env)
11
- @status, @headers, @response = instrument(env)
12
- [@status, @headers, @response]
13
- end
14
-
15
- private
16
-
17
- def initialize_tracer
18
7
  @tracer = Raygun::Apm::Tracer.new
19
8
  @tracer.udp_sink!
20
9
  @tracer.process_started
@@ -29,15 +18,20 @@ module Raygun
29
18
  end
30
19
 
31
20
  GC.stress = true if ENV['RAYGUN_STRESS_GC']
32
-
33
21
  # If any fatal errors on init, shutdown the tracer
34
22
  rescue Raygun::Apm::FatalError => e
35
23
  raygun_shutdown_handler(e)
36
24
  end
25
+
26
+ def call(env)
27
+ @status, @headers, @response = instrument(env)
28
+ [@status, @headers, @response]
29
+ end
30
+
31
+ private
37
32
 
38
33
  def instrument(env)
39
34
  res = nil
40
- @tracer_initialized ||= initialize_tracer
41
35
  # Can be nil if we had a fatal error
42
36
  if @tracer
43
37
  # For the exceptional HTTP IN handler
@@ -46,7 +40,7 @@ module Raygun
46
40
  @tracer.start_trace
47
41
  end
48
42
  res = Ruby_APM_profiler_trace{ @app.call(env) }
49
- if (status = res.first) >= 400 && status < 500 || status >= 500 && status < 600
43
+ if (status = res.first) >= 400 && status < 600
50
44
  exceptional_http_in_handler(env, status)
51
45
  end
52
46
  # Can be nil if we had a fatal error
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.0.14"
4
+ VERSION = "1.0.15"
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.14
4
+ version: 1.0.15
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-06 00:00:00.000000000 Z
12
+ date: 2020-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: raygun-apm