raygun-apm-rails 0.1.17 → 1.0.3
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/README.rdoc +2 -2
- data/lib/raygun/apm/rails.rb +1 -0
- data/lib/raygun/apm/rails/middleware.rb +14 -7
- data/lib/raygun/apm/rails/railtie.rb +1 -1
- data/lib/raygun/apm/rails/version.rb +1 -1
- data/raygun-apm-rails.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eea6a446a20e4aa80579fdb5e67c73bc98bc54c7660263b22d68f2446b1d89ed
|
4
|
+
data.tar.gz: 7b39d07857691aa62c77c3f039c81870d2fe804b0a0bdcdf9c383b88c4c98078
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d2579171bed2d5f63ec45db6ae1e3a8ac178eba56b918c8a1bb57acd6f34834d913e01bec1a3fe1219309cd1ea09ba2460755617bce76f15d5438dc4112dd66
|
7
|
+
data.tar.gz: 74313954758d795a519132b86b664a08bdefc2a33c111fd00aa6412739ba9aded7dacc64e58df560cf6675309ab144019ef5dc85c794c25b458e68d1820230ff
|
data/README.rdoc
CHANGED
@@ -67,7 +67,7 @@ instrument HTTP request / response workloads.
|
|
67
67
|
The following extended events are captured:
|
68
68
|
|
69
69
|
* HTTP inbound - the request URI, HTTP verb and other details of the current request
|
70
|
+
* HTTP outbound - the URI, HTTP verb and time taken (typically external APIs)
|
70
71
|
* Database queries - SQL statement, provider, database etc.
|
71
72
|
|
72
|
-
{Contact us}[https://raygun.com/about/contact] to support other
|
73
|
-
specific background processing frameworks.
|
73
|
+
{Contact us}[https://raygun.com/about/contact] to support other specific web frameworks.
|
data/lib/raygun/apm/rails.rb
CHANGED
@@ -41,20 +41,21 @@ module Raygun
|
|
41
41
|
raygun_shutdown_handler(e)
|
42
42
|
end
|
43
43
|
|
44
|
-
def start_of_trace
|
45
|
-
yield
|
46
|
-
end
|
47
|
-
|
48
44
|
def raygun_shutdown_handler(exception)
|
49
|
-
warn "Raygun APM shutting down due to error -
|
45
|
+
warn "[Raygun APM] shutting down due to error - #{exception.message}",
|
50
46
|
# Kill extended event subcriptions
|
51
47
|
ActiveSupport::Notifications.unsubscribe(@http_in_subscriber)
|
52
48
|
ActiveSupport::Notifications.unsubscribe(@sql_subscriber)
|
49
|
+
warn "[Raygun APM] notification hooks unsubscribed"
|
53
50
|
# Shutdown the tracepoint if enabled to reduce any overhead and stall emission
|
54
|
-
|
51
|
+
if @tracer.tracepoint.enabled?
|
52
|
+
@tracer.tracepoint.stop
|
53
|
+
warn "[Raygun APM] tracepoint stopped"
|
54
|
+
end
|
55
55
|
# Let the GC clean up the sink thread through the finalizer below
|
56
56
|
@tracer = nil
|
57
57
|
Thread.current.thread_variable_set(:_raygun_apm_tracer, nil)
|
58
|
+
unless (Raygun::Apm::FatalError === exception) raise(exception)
|
58
59
|
end
|
59
60
|
|
60
61
|
def http_in_handler(args)
|
@@ -70,11 +71,12 @@ module Raygun
|
|
70
71
|
event[:status] = notification.payload[:status]
|
71
72
|
# XXX constant milliseconds to microseconds
|
72
73
|
event[:duration] = notification.duration * 1000
|
73
|
-
event[:timestamp] =
|
74
|
+
event[:timestamp] = @tracer.now
|
74
75
|
event[:tid] = @tracer.get_thread_id(Thread.current)
|
75
76
|
@tracer.emit(event)
|
76
77
|
rescue => e
|
77
78
|
warn "[Raygun APM] error reporting HTTP IN event"
|
79
|
+
raygun_shutdown_handler(e)
|
78
80
|
end
|
79
81
|
|
80
82
|
def http_in_event
|
@@ -109,6 +111,7 @@ module Raygun
|
|
109
111
|
@tracer.emit(event)
|
110
112
|
rescue => e
|
111
113
|
warn "[Raygun APM] error reporting SQL event"
|
114
|
+
raygun_shutdown_handler(e)
|
112
115
|
end
|
113
116
|
|
114
117
|
def sql_event
|
@@ -119,6 +122,10 @@ module Raygun
|
|
119
122
|
end
|
120
123
|
end
|
121
124
|
|
125
|
+
def start_of_trace
|
126
|
+
yield
|
127
|
+
end
|
128
|
+
|
122
129
|
def self.finalize(tracer)
|
123
130
|
proc {tracer.process_ended}
|
124
131
|
end
|
@@ -2,7 +2,7 @@ module Raygun
|
|
2
2
|
module Apm
|
3
3
|
module Rails
|
4
4
|
class Railtie < ::Rails::Railtie
|
5
|
-
initializer "raygun.apm" do |app|
|
5
|
+
initializer "raygun.apm.rails" do |app|
|
6
6
|
require "raygun/apm"
|
7
7
|
require "raygun/apm/rails/middleware"
|
8
8
|
Raygun::Apm::Blacklist.extend_with Raygun::Apm::Rails::BLACKLIST
|
data/raygun-apm-rails.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_dependency "raygun-apm", "~> 0.0
|
26
|
+
spec.add_dependency "raygun-apm", "~> 1.0.0"
|
27
27
|
spec.add_development_dependency "bundler", "~> 1.17"
|
28
28
|
spec.add_development_dependency "rake", "~> 10.0"
|
29
29
|
spec.add_development_dependency "minitest", "~> 5.0"
|
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.
|
4
|
+
version: 1.0.3
|
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-02-
|
11
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: raygun-apm
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.0
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.0.
|
106
|
+
rubygems_version: 3.0.3
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Raygun application performance monitoring for Rails
|