raygun-apm-rails 1.0.23 → 1.0.28

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: 9c01afbb158b12686bc5f07ef0898e963c6d7c3419a7fd990bcd19c46081d8ca
4
- data.tar.gz: 067553cff98ea3b72bb142d69e6877697998f5ad632a5e4b5c2d95fb17e5210c
3
+ metadata.gz: e7e3e809e811345bbb8ed3fb1f94fbb023d41084ad5de44df7e9b47ecee88649
4
+ data.tar.gz: d4d7e9f4254acb5dfe409e8fb2d3369c87f718c8a77ae0b04da153d1c0dece44
5
5
  SHA512:
6
- metadata.gz: fd5dc7e6043bd9bd7923f867d804205fc437aae4f5edfeeee61740ac0915c3bb111b5f6f9d2e1ae864f580f3da99892a883c803065a6d797d14af494eddf6be7
7
- data.tar.gz: d21f5e5f0e336636aabc9037c938106b981152f092921c582fe210d8f179bfd875cfb1f3cf3a202d59330aa82f612c8751581b0ba3f29fc681bdb0415cf2aea0
6
+ metadata.gz: 7a40fa6a71ae303adfd0118bff4bd10cd1b3a94faa79b26eaa8b1ff241b6dfc473103953708abd7387e80da84b7023b2084621477a6b4a60ce52c3e6a1bba543
7
+ data.tar.gz: 898452ba25e08b1ced3e8c2ac3804025ea3f6402850c07e407b0e219cd38d3befb420d8387c267c3c91548015cbbcaa30c087d329b1770f0aeb41e6e34869397
@@ -1,5 +1,26 @@
1
1
  = Changelog
2
2
 
3
+ == 1.0.28 (April 11, 2020)
4
+
5
+ * Prefer local variables to Rack::Request methods for event value assignment (Rails 4)
6
+
7
+ == 1.0.27 (April 11, 2020)
8
+
9
+ * Restore Rails 4 support with caveat that HTTP IN paths are not fully qualified with protocol, host and port
10
+
11
+ == 1.0.26 (April 11, 2020)
12
+
13
+ * Remove Rails 4 support (no headers element in the notifications hash for HTTP in)
14
+
15
+ == 1.0.25 (April 11, 2020)
16
+
17
+ * Only ever attempt to emit extended events if a tracer instance is alive
18
+
19
+ == 1.0.24 (April 1, 2020)
20
+
21
+ * Blacklist Enumeration
22
+ * Unsubscribe from previously registered AS::Notifications subscribers as child processes emit double HTTP IN and SQL events otherwise
23
+
3
24
  == 1.0.23 (March 25, 2020)
4
25
 
5
26
  * Do not cache PID on HTTP IN and SQL event initializers
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- raygun-apm-rails (0.1.0)
5
- raygun-apm (~> 0.0.8)
4
+ raygun-apm-rails (1.0.28)
5
+ raygun-apm (~> 1.0.15)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  minitest (5.13.0)
11
11
  rake (10.5.0)
12
- raygun-apm (0.0.8-x86-linux)
12
+ raygun-apm (1.0.29-universal-darwin)
13
13
 
14
14
  PLATFORMS
15
15
  ruby
16
16
 
17
17
  DEPENDENCIES
18
- bundler (~> 1.17)
18
+ bundler (~> 2.1.4)
19
19
  minitest (~> 5.0)
20
20
  rake (~> 10.0)
21
21
  raygun-apm-rails!
22
22
 
23
23
  BUNDLED WITH
24
- 1.17.3
24
+ 2.1.4
@@ -25,9 +25,8 @@ The profiler only supports CRuby, also known as Matz's Ruby Interpreter (MRI).
25
25
 
26
26
  == Supported Rails versions
27
27
 
28
- Rails 4 and up.
28
+ Rails 5 and up.
29
29
 
30
- * Rails 4.x
31
30
  * Rails 5.x
32
31
  * Rails 6.x
33
32
 
@@ -76,6 +76,7 @@ module Raygun
76
76
  Warden
77
77
  Grape
78
78
  Mustermann
79
+ Enumeration
79
80
  Raygun::Breadcrumbs
80
81
  Raygun::Configuration
81
82
  Raygun::config
@@ -36,14 +36,14 @@ module Raygun
36
36
  rescue => e
37
37
  Raygun.track_exception(e, env) if Raygun::Apm::Rails.raygun4ruby?
38
38
  end
39
- exceptional_http_in_handler(env, status)
39
+ exceptional_http_in_handler(env, status) if @tracer
40
40
  end
41
41
  end
42
42
  rescue => e
43
43
  Ruby_APM_request_error do
44
44
  raise e rescue nil
45
45
  Raygun.track_exception(e, env) if Raygun::Apm::Rails.raygun4ruby?
46
- exceptional_http_in_handler(env, 500)
46
+ exceptional_http_in_handler(env, 500) if @tracer
47
47
  end
48
48
  exception = e
49
49
  end
@@ -62,12 +62,14 @@ module Raygun
62
62
  tracer.process_started
63
63
  ObjectSpace.define_finalizer(self, self.class.finalize(tracer))
64
64
 
65
+ ActiveSupport::Notifications.unsubscribe(@http_in_subscriber) if @http_in_subscriber
65
66
  @http_in_subscriber = ActiveSupport::Notifications.subscribe('process_action.action_controller') do |*args|
66
- http_in_handler(args)
67
+ http_in_handler(args) if @tracer
67
68
  end
68
69
 
70
+ ActiveSupport::Notifications.unsubscribe(@sql_subscriber) if @sql_subscriber
69
71
  @sql_subscriber = ActiveSupport::Notifications.subscribe('sql.active_record') do |*args|
70
- sql_handler(args)
72
+ sql_handler(args) if @tracer
71
73
  end
72
74
 
73
75
  GC.stress = true if ENV['RAYGUN_STRESS_GC']
@@ -93,11 +95,18 @@ module Raygun
93
95
  if notification.payload[:exception]
94
96
  return
95
97
  end
96
- req = Rack::Request.new notification.payload[:headers].env
98
+ if headers = notification.payload[:headers]
99
+ req = Rack::Request.new headers.env
100
+ url = req.url
101
+ verb = req.request_method
102
+ else
103
+ url = notification.payload[:path]
104
+ verb = notification.payload[:method].to_s.upcase
105
+ end
97
106
  event = http_in_event
98
107
  event[:pid] = Process.pid
99
- event[:url] = req.url
100
- event[:verb] = req.request_method
108
+ event[:url] = url
109
+ event[:verb] = verb
101
110
  event[:status] = notification.payload[:status]
102
111
  # XXX constant milliseconds to microseconds
103
112
  event[:duration] = notification.duration * 1000
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.0.23"
4
+ VERSION = "1.0.28"
5
5
  end
6
6
  end
7
7
  end
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ["lib"]
22
22
 
23
23
  spec.add_dependency "raygun-apm", "~> 1.0.15"
24
- spec.add_development_dependency "bundler", "~> 1.17"
24
+ spec.add_development_dependency "bundler", "~> 2.1.4"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "minitest", "~> 5.0"
27
27
  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.23
4
+ version: 1.0.28
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-25 00:00:00.000000000 Z
12
+ date: 2020-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: raygun-apm
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '1.17'
34
+ version: 2.1.4
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '1.17'
41
+ version: 2.1.4
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement