raygun-apm 1.0.46-x64-mingw32 → 1.0.52-x64-mingw32
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 +1 -1
- data/ext/raygun/extconf.rb +3 -1
- data/lib/raygun/2.5/raygun_ext.so +0 -0
- data/lib/raygun/2.6/raygun_ext.so +0 -0
- data/lib/raygun/2.7/raygun_ext.so +0 -0
- data/lib/raygun/apm.rb +11 -0
- data/lib/raygun/apm/blacklist.rb +28 -1
- data/lib/raygun/apm/diagnostics.rb +26 -8
- data/lib/raygun/apm/hooks/excon.rb +36 -0
- data/lib/raygun/apm/hooks/httpclient.rb +36 -0
- data/lib/raygun/apm/hooks/internals.rb +74 -0
- data/lib/raygun/apm/tracer.rb +6 -2
- data/lib/raygun/apm/version.rb +2 -1
- data/raygun-apm.gemspec +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eb096598696fb11165d3bd01801f1b7034ee0e47481f083db217a624596f34c
|
4
|
+
data.tar.gz: 7b9f1112b5032073497dd8003d193dc4bd819789400fd725941030efe1f879e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b99bb4c0bf16fe3fc4d6264065f55138498bffd6768e78539b6ebf60db71dc7784b167326bd14eefb10ff3ff7877a847db3eb1c9aabd1c53cef18bf374ea9850
|
7
|
+
data.tar.gz: 7e613d703b71886e5d173296f0703e3b836062bbb71c49d861461b434ce85f4113bd22df91e814d3efed1ad5b3c811c03cd078fabeb56e0667b77bb183c58ea6
|
data/README.rdoc
CHANGED
@@ -49,7 +49,7 @@ The Linux version can be installed either using {systemd}[https://raygun.com/doc
|
|
49
49
|
|
50
50
|
On windows the agent can be installed either via {MSI installer}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-linux-using-terminal] or on {.NET core}[https://raygun.com/documentation/product-guides/apm/agent/installation/#installing-on-windows-net-core]
|
51
51
|
|
52
|
-
== Ruby on Rails
|
52
|
+
== Ruby on Rails
|
53
53
|
|
54
54
|
For Rails support see {documentation}[https://www.rubydoc.info/gems/raygun-apm-rails/0.1.0] of the railgun-apm-rails gem.
|
55
55
|
|
data/ext/raygun/extconf.rb
CHANGED
@@ -10,6 +10,9 @@ headers = proc do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
dir_config('raygun')
|
13
|
+
|
14
|
+
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
15
|
+
|
13
16
|
append_cflags '-pedantic'
|
14
17
|
append_cflags '-Wall'
|
15
18
|
append_cflags '-Werror=switch'
|
@@ -27,7 +30,6 @@ if ENV['DEBUG']
|
|
27
30
|
append_cflags '-fstack-protector-all'
|
28
31
|
append_cflags '-DRB_RG_DEBUG'
|
29
32
|
else
|
30
|
-
#append_cflags '-DRAX_DEBUG_MSG'
|
31
33
|
append_cflags '-O3'
|
32
34
|
end
|
33
35
|
|
Binary file
|
Binary file
|
Binary file
|
data/lib/raygun/apm.rb
CHANGED
@@ -1,14 +1,25 @@
|
|
1
1
|
require "raygun/apm/version"
|
2
|
+
|
2
3
|
begin
|
4
|
+
# Attempt to load a precompiled shared object (released gem)
|
3
5
|
RUBY_VERSION =~ /(\d+\.\d+)/
|
4
6
|
require "raygun/#{$1}/raygun_ext"
|
5
7
|
rescue LoadError
|
8
|
+
# Attempt to load the development specific extension (non-released gem, local dev)
|
6
9
|
require "raygun/raygun_ext"
|
7
10
|
end
|
11
|
+
|
8
12
|
require "raygun/apm/config"
|
9
13
|
require "raygun/apm/diagnostics"
|
10
14
|
require "raygun/apm/blacklist/parser"
|
11
15
|
require "raygun/apm/blacklist/translator"
|
12
16
|
require "raygun/apm/tracer"
|
13
17
|
require "raygun/apm/event"
|
18
|
+
require "raygun/apm/hooks/internals"
|
14
19
|
require "raygun/apm/hooks/net_http"
|
20
|
+
# conditionally required - may not be bundled
|
21
|
+
begin
|
22
|
+
require "raygun/apm/hooks/httpclient"
|
23
|
+
require "raygun/apm/hooks/excon"
|
24
|
+
rescue LoadError
|
25
|
+
end
|
data/lib/raygun/apm/blacklist.rb
CHANGED
@@ -140,11 +140,38 @@ module Raygun
|
|
140
140
|
Delegator#
|
141
141
|
PrettyPrint#
|
142
142
|
PP#
|
143
|
+
PP::
|
144
|
+
PrettyPrint#
|
145
|
+
PrettyPrint::
|
143
146
|
Minitest
|
144
147
|
Psych
|
145
148
|
Mutex_m#
|
146
149
|
ERB#
|
147
150
|
ERB::
|
151
|
+
Gem#
|
152
|
+
Gem::
|
153
|
+
FileUtils#
|
154
|
+
FileUtils::
|
155
|
+
TempFile#
|
156
|
+
TempFile::
|
157
|
+
}
|
158
|
+
|
159
|
+
INTERNALS = %w{
|
160
|
+
+Object#sleep
|
161
|
+
+Object#exec
|
162
|
+
+Object#fork
|
163
|
+
+Object#system
|
164
|
+
+Object#spawn
|
165
|
+
+Continuation#callcc
|
166
|
+
+IO#syscall
|
167
|
+
+IO#open
|
168
|
+
+IO#puts
|
169
|
+
+IO#gets
|
170
|
+
+IO#readline
|
171
|
+
+IO#readlines
|
172
|
+
+Random#srand
|
173
|
+
+Random#rand
|
174
|
+
+Signal#trap
|
148
175
|
}
|
149
176
|
|
150
177
|
HTTP_OUT = %w{
|
@@ -426,7 +453,7 @@ module Raygun
|
|
426
453
|
end
|
427
454
|
|
428
455
|
def self.resolve_entries
|
429
|
-
DEFAULT_RUBY + PROFILER + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
|
456
|
+
DEFAULT_RUBY + PROFILER + INTERNALS + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
|
430
457
|
end
|
431
458
|
end
|
432
459
|
end
|
@@ -4,31 +4,49 @@ require "json"
|
|
4
4
|
module Raygun
|
5
5
|
module Apm
|
6
6
|
class Diagnostics
|
7
|
-
AGENT_STATE_DOWN = "
|
8
|
-
|
9
|
-
|
7
|
+
AGENT_STATE_DOWN = "\nThe Raygun APM Agent appears to not be running on the current host.\nIf not already installed, please consult https://raygun.com/documentation/product-guides/apm/agent/downloads/\nOtherwise refer to https://raygun.com/documentation/product-guides/apm/agent/installation/ for starting the Agent."
|
8
|
+
AGENT_STATE_UNKNOWN = "\nUnable to determine the state of the Raygun APM Agent."
|
9
|
+
AGENT_STATE_UP_MISCONFIGURED = "\nThe Raygun APM Agent is running, but misconfigured.\nThe API Key needs to be set through the Raygun_ApiKey environment variable.\nThe API key can be found under 'Application Settings' in the Raygun UI"
|
10
|
+
AGENT_STATE_UP_CONFIGURED = "\nThe Raygun APM Agent is configured properly!"
|
11
|
+
AGENT_MINIMUM_VERSION_NOT_MET = "\nVersion #{Raygun::Apm::VERSION} of the Raygun APM Profiler requires a minimum Agent version #{Raygun::Apm::MINIMUM_AGENT_VERSION}\nPlease download the latest Agent from https://raygun.com/documentation/product-guides/apm/agent/downloads/"
|
10
12
|
|
11
13
|
def initialize(host: Apm::Config::TCP_MANAGEMENT_HOST, port: Apm::Config::TCP_MANAGEMENT_PORT)
|
12
14
|
@host = host
|
13
15
|
@port = port
|
14
16
|
end
|
15
17
|
|
16
|
-
def verify_agent
|
18
|
+
def verify_agent(tracer)
|
17
19
|
socket.write "GetAgentInfo"
|
18
20
|
response = JSON.parse(socket.gets)
|
19
|
-
if response['
|
20
|
-
puts
|
21
|
-
|
22
|
-
|
21
|
+
if minimum_agent_version_not_met?(response['Version'])
|
22
|
+
puts AGENT_MINIMUM_VERSION_NOT_MET
|
23
|
+
tracer.noop!
|
24
|
+
else
|
25
|
+
if response['Status'] == 1
|
26
|
+
puts AGENT_STATE_UP_CONFIGURED
|
27
|
+
elsif response['Status'] == 0
|
28
|
+
puts AGENT_STATE_UP_MISCONFIGURED
|
29
|
+
end
|
23
30
|
end
|
24
31
|
rescue Errno::ECONNREFUSED
|
25
32
|
puts AGENT_STATE_DOWN
|
33
|
+
rescue
|
34
|
+
puts AGENT_STATE_UNKNOWN
|
26
35
|
end
|
27
36
|
|
28
37
|
private
|
29
38
|
def socket
|
30
39
|
@socket ||= s = TCPSocket.new(@host, @port)
|
31
40
|
end
|
41
|
+
|
42
|
+
def minimum_agent_version_not_met?(version)
|
43
|
+
# Legacy path
|
44
|
+
if String === version
|
45
|
+
version < Raygun::Apm::MINIMUM_AGENT_VERSION
|
46
|
+
else
|
47
|
+
"#{version['Major']}.#{version['Minor']}.#{version['Build']}.#{version['Revision']}" < Raygun::Apm::MINIMUM_AGENT_VERSION
|
48
|
+
end
|
49
|
+
end
|
32
50
|
end
|
33
51
|
end
|
34
52
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'excon'
|
2
|
+
|
3
|
+
module Raygun
|
4
|
+
module Apm
|
5
|
+
module Hooks
|
6
|
+
module Excon
|
7
|
+
def request(params={}, &block)
|
8
|
+
if tracer = Raygun::Apm::Tracer.instance
|
9
|
+
started = tracer.now
|
10
|
+
response = super
|
11
|
+
ended = tracer.now
|
12
|
+
event = raygun_apm_http_out_event
|
13
|
+
event[:pid] = Process.pid
|
14
|
+
event[:url] = "#{@data[:scheme]}://#{@data[:host]}/#{params[:path]}"
|
15
|
+
event[:verb] = params[:method].to_s.upcase
|
16
|
+
event[:status] = response.status
|
17
|
+
event[:duration] = ended - started
|
18
|
+
event[:timestamp] = started
|
19
|
+
event[:tid] = tracer.get_thread_id(Thread.current)
|
20
|
+
tracer.emit(event)
|
21
|
+
response
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def raygun_apm_http_out_event
|
29
|
+
@_raygun_apm_http_out_event ||= Raygun::Apm::Event::HttpOut.new
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
Excon::Connection.prepend(Raygun::Apm::Hooks::Excon)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'httpclient'
|
2
|
+
|
3
|
+
module Raygun
|
4
|
+
module Apm
|
5
|
+
module Hooks
|
6
|
+
module HTTPClient
|
7
|
+
def do_request(method, uri, query, body, header, &filtered_block)
|
8
|
+
if tracer = Raygun::Apm::Tracer.instance
|
9
|
+
started = tracer.now
|
10
|
+
response = super
|
11
|
+
ended = tracer.now
|
12
|
+
event = raygun_apm_http_out_event
|
13
|
+
event[:pid] = Process.pid
|
14
|
+
event[:url] = query ? URI.join(uri, query).to_s : uri.to_s
|
15
|
+
event[:verb] = method.to_s.upcase
|
16
|
+
event[:status] = response.code.to_i
|
17
|
+
event[:duration] = ended - started
|
18
|
+
event[:timestamp] = started
|
19
|
+
event[:tid] = tracer.get_thread_id(Thread.current)
|
20
|
+
tracer.emit(event)
|
21
|
+
response
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def raygun_apm_http_out_event
|
29
|
+
@_raygun_apm_http_out_event ||= Raygun::Apm::Event::HttpOut.new
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
HTTPClient.prepend(Raygun::Apm::Hooks::HTTPClient)
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Raygun
|
2
|
+
module Apm
|
3
|
+
module Hooks
|
4
|
+
module Object
|
5
|
+
def system(*args)
|
6
|
+
super
|
7
|
+
end
|
8
|
+
|
9
|
+
def sleep(*args)
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def exec(*args)
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def spawn(*args)
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def fork(*args)
|
22
|
+
super
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module IO
|
27
|
+
def sycall(*args)
|
28
|
+
super
|
29
|
+
end
|
30
|
+
|
31
|
+
def open(*args)
|
32
|
+
super
|
33
|
+
end
|
34
|
+
|
35
|
+
def puts(*args)
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
def gets(*args)
|
40
|
+
super
|
41
|
+
end
|
42
|
+
|
43
|
+
def readline(*args)
|
44
|
+
super
|
45
|
+
end
|
46
|
+
|
47
|
+
def readlines(*args)
|
48
|
+
super
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
module Random
|
53
|
+
def srand(*args)
|
54
|
+
super
|
55
|
+
end
|
56
|
+
|
57
|
+
def rand(*args)
|
58
|
+
super
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
module Signal
|
63
|
+
def trap(*args)
|
64
|
+
super
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
Object.prepend Raygun::Apm::Hooks::Object
|
72
|
+
IO.prepend Raygun::Apm::Hooks::IO
|
73
|
+
Random.prepend Raygun::Apm::Hooks::Random
|
74
|
+
Signal.prepend Raygun::Apm::Hooks::Signal
|
data/lib/raygun/apm/tracer.rb
CHANGED
@@ -69,12 +69,16 @@ module Raygun
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def register_known_library_paths
|
72
|
-
|
72
|
+
if defined?(Bundler)
|
73
|
+
self.register_libraries Bundler.load.specs.map(&:full_gem_path).sort << RbConfig::CONFIG['rubylibdir']
|
74
|
+
else
|
75
|
+
self.register_libraries [RbConfig::CONFIG['rubylibdir']]
|
76
|
+
end
|
73
77
|
end
|
74
78
|
|
75
79
|
def run_agent_connectivity_diagnostics
|
76
80
|
check = Raygun::Apm::Diagnostics.new
|
77
|
-
check.verify_agent
|
81
|
+
check.verify_agent(self)
|
78
82
|
end
|
79
83
|
end
|
80
84
|
end
|
data/lib/raygun/apm/version.rb
CHANGED
data/raygun-apm.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.homepage = "https://raygun.com/platform/apm"
|
13
13
|
#spec.license = "MIT"
|
14
14
|
|
15
|
-
spec.files =
|
15
|
+
spec.files = Dir['README.rdoc', 'raygun-apm.gemspec', 'lib/**/*', 'bin/**/*'].reject { |f| f.match(/raygun_ext\./) }
|
16
16
|
spec.files += Dir['lib/raygun/**/{2}*/raygun_ext.*']
|
17
17
|
spec.bindir = "exe"
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.52
|
5
5
|
platform: x64-mingw32
|
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-
|
12
|
+
date: 2020-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: debase-ruby_core_source
|
@@ -216,6 +216,9 @@ files:
|
|
216
216
|
- lib/raygun/apm/config.rb
|
217
217
|
- lib/raygun/apm/diagnostics.rb
|
218
218
|
- lib/raygun/apm/event.rb
|
219
|
+
- lib/raygun/apm/hooks/excon.rb
|
220
|
+
- lib/raygun/apm/hooks/httpclient.rb
|
221
|
+
- lib/raygun/apm/hooks/internals.rb
|
219
222
|
- lib/raygun/apm/hooks/net_http.rb
|
220
223
|
- lib/raygun/apm/hooks/redis.rb
|
221
224
|
- lib/raygun/apm/tracer.rb
|