raygun-apm-rails 0.1.12 → 0.1.17

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: 0a4b9163fa7ad19d6a57734000d788288c5f1ca74ce4d3729d4ff9acd81036d0
4
- data.tar.gz: 76a7c8afa228f0586528f1009d0ae7fed3c596b5b332a9b61534dcdac37a7fdc
3
+ metadata.gz: 05c94e26072a3cc6fa28f93a282ff4959ee65af938385bfc9e92ff9b9579b272
4
+ data.tar.gz: e443936f063325a320242f10b8c586b8149c7f5d7db8f36ccba1f800ff5eaed7
5
5
  SHA512:
6
- metadata.gz: ac85078db0464c339ece99a1099e7ba0d4beaef0c36b2202efb007635f7344c14f78b0c2f15a318ffd1ad1f6a6e247cdeee41942e434b8fab4ea8a84134fd8e5
7
- data.tar.gz: dedc829409e7e9a581b2b5a1d028338d1e4171f71ec937845de11267b1fd1f69654e6758322cc1c7421f82bff747e2def7f0702c8da49ed8e8e62079caf7fb50
6
+ metadata.gz: 6137d60a60f974f4722b274db2c14ff6455927563f870daf9586b998ab12d97f75436bf13d3ff105e2e2a14835bfb0f652825124b3b42e9ef280786b127f3bdc
7
+ data.tar.gz: 332eb53c2cc736afde6b0b66cb1edfa775679574538c662b8911186f3b5cdbdc5654a2cf49699263864be443f2c1ec61821234b95941748a82b676f11bb71989
@@ -7,10 +7,8 @@ module Raygun
7
7
 
8
8
  # from https://api.rubyonrails.org/ , to automate
9
9
  BLACKLIST = %w{
10
- #<Class:
11
- #<Module:
12
- #<ActiveRecord:
13
- #<ActiveModel:
10
+ #<ActiveRecord
11
+ #<ActiveModel
14
12
  Benchmark
15
13
  BigDecimal
16
14
  Concurrent
@@ -51,20 +49,15 @@ module Raygun
51
49
  ActionDispatch
52
50
  ActiveSupport
53
51
  ActionView
54
- ApplicationHelper
55
52
  SQLite3
56
53
  Mysql2
57
54
  Erubi
58
- ApplicationController
59
55
  RequestStore
60
56
  WEBrick
61
57
  Puma
62
58
  PG
63
59
  EnabledModule
64
- }
65
-
66
- BOUNDARY = %w{
67
- +RequestStore::Middleware::call
60
+ +Raygun::Apm::Rails::Middleware::start_of_trace
68
61
  }
69
62
  end
70
63
  end
@@ -33,14 +33,18 @@ module Raygun
33
33
  Thread.current.thread_variable_set(:_raygun_apm_tracer, @tracer)
34
34
  @tracer.start_trace
35
35
  end
36
- res = @app.call(env)
36
+ res = start_of_trace{ @app.call(env) }
37
37
  # Can be nil if we had a fatal error
38
38
  @tracer.end_trace if @tracer
39
39
  res
40
40
  rescue Raygun::Apm::FatalError => e
41
41
  raygun_shutdown_handler(e)
42
42
  end
43
-
43
+
44
+ def start_of_trace
45
+ yield
46
+ end
47
+
44
48
  def raygun_shutdown_handler(exception)
45
49
  warn "Raygun APM shutting down due to error - %s", e.message
46
50
  # Kill extended event subcriptions
@@ -6,8 +6,7 @@ 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
- Raygun::Apm::Blacklist.extend_with Raygun::Apm::Rails::BOUNDARY
10
- app.middleware.insert_before Rack::Sendfile, Raygun::Apm::Rails::Middleware
9
+ app.middleware.use Raygun::Apm::Rails::Middleware
11
10
  # Explictly enable instrumenting HTTP until a good control API is figured out
12
11
  require "raygun/apm/hooks/net_http"
13
12
  end
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "0.1.12"
4
+ VERSION = "0.1.17"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erkki Eilonen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: raygun-apm
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.1.2
106
+ rubygems_version: 3.0.6
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Raygun application performance monitoring for Rails