raygun-apm-rails 1.0.57 → 1.1.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
  SHA256:
3
- metadata.gz: 77b2cb6b362699a84104a6482f78b07e048cfe4078f6e9c8bb4c3ccb3f68790d
4
- data.tar.gz: 87841e971bf4b9c11bd307425d3a4c3fcd8a64c3146ecf6d5da31c8f21f507ce
3
+ metadata.gz: 37bbd014edd21ac021ef27ce2c2c1237b4929fa7ab97932eb846f0ed95a741bb
4
+ data.tar.gz: d727c1e6fb3a93d242aa0331c9db3cba4e1e827d823895bef83152c526a10390
5
5
  SHA512:
6
- metadata.gz: 7f08c270b6bb5d837f582a17f64750839042a38218895ae842f7541e18563893703ace59900c7ba6faf6cc9a030a523f19c9c11a8c8c8e9efaca11a8dc2bc51f
7
- data.tar.gz: daaa001d451f0f7d01c8133021ff1735a645324f55aabb1b1108252f9d1a8bd48a4593e2037e7709832d5d3b18340e9089f8691ed78dd4e10c6d1c44333c2b99
6
+ metadata.gz: 7ee47a2ac3b3b92c3794c872b7117a0d7dd3139915bdb472cd6f22656f18215a69602ccfbc880585a7da4a3d4c69a64fa825bd9db7588c8f93b513af14c3a77f
7
+ data.tar.gz: d3763e1a6ed7ab227c07bb131355c3a1fe2639f94dfe7b9173e5c3cc3d857acb2d42a97562a08560b0a5c75dc745d2e6c929ecb53194592cdbcacc2a7af79858
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Raygun Limited
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -18,7 +18,7 @@ module Raygun
18
18
 
19
19
  def instrument(env)
20
20
  # Ignore asset requests
21
- if env['REQUEST_PATH'].match(/^\/assets\//)
21
+ if (env['REQUEST_PATH'] || env['REQUEST_URI']).match(/^\/assets\//)
22
22
  return @app.call(env)
23
23
  end
24
24
  @mutex.synchronize do
@@ -103,7 +103,7 @@ module Raygun
103
103
  event[:pid] = Process.pid
104
104
  event[:url] = url
105
105
  event[:verb] = verb
106
- event[:status] = notification.payload[:status] || notification.payload[:headers]["action_controller.instance"].status
106
+ event[:status] = http_in_status(notification)
107
107
  # XXX constant milliseconds to microseconds
108
108
  event[:duration] = notification.duration * 1000
109
109
  event[:timestamp] = @tracer.now
@@ -114,6 +114,13 @@ module Raygun
114
114
  raygun_shutdown_handler(e)
115
115
  end
116
116
 
117
+ def http_in_status(notification)
118
+ notification.payload[:status] || notification.payload[:headers]["action_controller.instance"].status
119
+ rescue
120
+ warn "[Raygun APM] error inferring HTTP status, fallback to 200"
121
+ 200
122
+ end
123
+
117
124
  # For middleware chain halts that does not trigger 'process_action.action_controller'
118
125
  def exceptional_http_in_handler(env)
119
126
  req = Rack::Request.new env
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.0.57"
4
+ VERSION = "1.1.2"
5
5
  end
6
6
  end
7
7
  end
@@ -6,19 +6,19 @@ require "raygun/apm/rails/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "raygun-apm-rails"
8
8
  spec.version = Raygun::Apm::Rails::VERSION
9
- spec.authors = ["Raygun", "Erkki Eilonen"]
10
- spec.email = ["support@raygun.com", "info@bearmetal.eu"]
9
+ spec.authors = ["Raygun Limited"]
10
+ spec.email = ["ruby-apm@raygun.io", "support@raygun.com"]
11
11
 
12
12
  spec.summary = %q{Raygun application performance monitoring for Rails}
13
13
  spec.homepage = "https://raygun.com/platform/apm"
14
- #spec.license = "MIT"
14
+ spec.license = "MIT"
15
15
 
16
- spec.files = Dir['README.rdoc', 'raygun-apm-rails.gemspec', 'lib/**/*', 'bin/**/*']
16
+ spec.files = Dir['README.rdoc', 'LICENSE', 'raygun-apm-rails.gemspec', 'lib/**/*', 'bin/**/*']
17
17
  spec.bindir = "exe"
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "raygun-apm", "~> 1.0.53"
21
+ spec.add_dependency "raygun-apm"
22
22
  spec.add_development_dependency "bundler", "~> 2.1.4"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "minitest", "~> 5.0"
metadata CHANGED
@@ -1,30 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.57
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
- - Raygun
8
- - Erkki Eilonen
7
+ - Raygun Limited
9
8
  autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: raygun-apm
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - "~>"
17
+ - - ">="
19
18
  - !ruby/object:Gem::Version
20
- version: 1.0.53
19
+ version: '0'
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
- - - "~>"
24
+ - - ">="
26
25
  - !ruby/object:Gem::Version
27
- version: 1.0.53
26
+ version: '0'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: bundler
30
29
  requirement: !ruby/object:Gem::Requirement
@@ -69,12 +68,13 @@ dependencies:
69
68
  version: '5.0'
70
69
  description:
71
70
  email:
71
+ - ruby-apm@raygun.io
72
72
  - support@raygun.com
73
- - info@bearmetal.eu
74
73
  executables: []
75
74
  extensions: []
76
75
  extra_rdoc_files: []
77
76
  files:
77
+ - LICENSE
78
78
  - README.rdoc
79
79
  - bin/console
80
80
  - bin/setup
@@ -84,7 +84,8 @@ files:
84
84
  - lib/raygun/apm/rails/version.rb
85
85
  - raygun-apm-rails.gemspec
86
86
  homepage: https://raygun.com/platform/apm
87
- licenses: []
87
+ licenses:
88
+ - MIT
88
89
  metadata: {}
89
90
  post_install_message:
90
91
  rdoc_options: []