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 +4 -4
- data/lib/raygun/apm/rails/middleware.rb +8 -14
- data/lib/raygun/apm/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79c1cf537ee9e8f781c49e3c2cc6cc74b8b38225e50e34bca773cae3cfdbc6b1
|
4
|
+
data.tar.gz: 5bd799bfa20772be1aa736220be6bb9efbfdc0aeb07d6b5c84a24b9d3bda0ac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 <
|
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
|
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.
|
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-
|
12
|
+
date: 2020-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: raygun-apm
|