raygun-apm 1.0.45-x64-mingw32 → 1.0.51-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8eab8fae06e651ee0445a69529b643e679f258d70581199e1c33b091b033d0c
4
- data.tar.gz: da7b5b376c123bf2fe73c6ff1f0724a654d9073fe7b845cefeeb353c5f3bb417
3
+ metadata.gz: fab20c300b6775a0d7ee6b7e21c679be442f0fab30ef932faa5d0f946e68165e
4
+ data.tar.gz: b6389adb233a89a67a58b7f5f09453b3705706ec59c03ac15dc14eed5ccdb962
5
5
  SHA512:
6
- metadata.gz: dab160f63fed944a92f0d7844776d8490b655468fd867bfcb66bcdb7e0aa520cf5e1ea3cb390abd9e16a773ec0111029eabb02a39edf83a68013825543ea2c38
7
- data.tar.gz: 8a82291195d1fde8c0667cc81ac5fa9ea10376300767b8f9eb736606d3da600f547705bc5e8dca5d12684d370295d25dd840d1eae0f14cf59422b967da214280
6
+ metadata.gz: 81073dbe3a95b4531d754dafa06fbb4cac78f7ac7742a3b9ac316571dcc3fd9a6f06754bf08496760583c269c92841dbceb6e2376263d1fe6ce5d2bc31794152
7
+ data.tar.gz: 32ffa53a071df064723f861de66366334a4e650cd9483f6ae6e621885d5aaddd0cb88dab825bb5c1b468f17e88fb85a3559bc15834161b387fcde8a7ee4ed6a5
@@ -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
 
@@ -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
@@ -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
@@ -12,156 +12,166 @@ module Raygun
12
12
  #<Module:
13
13
  #<Class:
14
14
  #<#<Class:
15
- ARGF
16
- ArgumentError
17
- Array
18
- Base64
19
- BasicObject
20
- Binding
21
- Class
22
- ClosedQueueError
23
- Comparable
24
- Complex
25
- ConditionVariable
26
- Continuation
27
- Data
28
- Dir
29
- ENV
30
- EOFError
31
- Encoding
32
- Encoding::CompatibilityError
33
- Encoding::Converter
34
- Encoding::ConverterNotFoundError
35
- Encoding::InvalidByteSequenceError
36
- Encoding::UndefinedConversionError
37
- EncodingError
38
- Enumerable
39
- Enumerator
40
- Enumerator::ArithmeticSequence
41
- Enumerator::Chain
42
- Enumerator::Generator
43
- Enumerator::Lazy
44
- Enumerator::Yielder
45
- Errno
46
- Exception
47
- FalseClass
48
- Fiber
49
- FiberError
50
- File
51
- File::Constants
52
- File::Stat
53
- FileTest
54
- Float
55
- FloatDomainError
56
- FrozenError
57
- GC
58
- GC::Profiler
59
- Hash
60
- IO
61
- IO::EAGAINWaitReadable
62
- IO::EAGAINWaitWritable
63
- IO::EINPROGRESSWaitReadable
64
- IO::EINPROGRESSWaitWritable
65
- IO::EWOULDBLOCKWaitReadable
66
- IO::EWOULDBLOCKWaitWritable
67
- IO::WaitReadable
68
- IO::WaitWritable
69
- IOError
70
- IndexError
71
- Integer
72
- Interrupt
73
- JSON
74
- Kernel
75
- KeyError
76
- LoadError
77
- LocalJumpError
78
- Marshal
79
- MatchData
80
- Math
81
- Math::DomainError
15
+ ARGF#
16
+ ArgumentError#
17
+ Array#
18
+ Base64#
19
+ BasicObject#
20
+ Binding#
21
+ Class#
22
+ ClosedQueueError#
23
+ Comparable#
24
+ Complex#
25
+ ConditionVariable#
26
+ Continuation#
27
+ Data#
28
+ Dir#
29
+ ENV#
30
+ EOFError#
31
+ Encoding#
32
+ Encoding::
33
+ EncodingError#
34
+ Enumerable#
35
+ Enumerator#
36
+ Enumerator::
37
+ Errno#
38
+ Exception#
39
+ FalseClass#
40
+ Fiber#
41
+ FiberError#
42
+ File#
43
+ File::
44
+ FileTest#
45
+ Float#
46
+ FloatDomainError#
47
+ FrozenError#
48
+ GC#
49
+ GC::Profiler#
50
+ Hash#
51
+ IO#
52
+ IO::
53
+ IOError#
54
+ IndexError#
55
+ Integer#
56
+ Interrupt#
57
+ JSON#
58
+ Kernel#
59
+ KeyError#
60
+ LoadError#
61
+ LocalJumpError#
62
+ Marshal#
63
+ MatchData#
64
+ Math#
65
+ Math::
82
66
  Method#
83
- Module
84
- Mutex
85
- NameError
86
- NilClass
87
- NoMemoryError
88
- NoMethodError
89
- NotImplementedError
90
- Numeric
91
- Object
92
- ObjectSpace
93
- ObjectSpace::WeakMap
94
- Proc
95
- Process
96
- Process::GID
97
- Process::Status
98
- Process::Sys
99
- Process::UID
100
- Psych
101
- Queue
102
- Random
103
- Random::Formatter
104
- Range
105
- RangeError
106
- Rational
107
- Regexp
108
- RegexpError
109
- RubyVM
110
- RubyVM::AbstractSyntaxTree
111
- RubyVM::AbstractSyntaxTree::Node
112
- RubyVM::InstructionSequence
113
- RubyVM::MJIT
114
- RuntimeError
115
- ScriptError
116
- SecurityError
117
- Set
118
- SimpleDelegator
119
- Signal
120
- SignalException
121
- SizedQueue
122
- Socket
123
- StandardError
124
- StopIteration
125
- String
126
- Struct
127
- Symbol
128
- SyntaxError
129
- SystemCallError
130
- SystemExit
131
- SystemStackError
132
- Thread
133
- Thread::Backtrace
134
- Thread::Backtrace::Location
135
- ThreadError
136
- ThreadGroup
137
- Time
138
- TracePoint
139
- TrueClass
140
- TypeError
141
- UnboundMethod
142
- UncaughtThrowError
143
- UnicodeNormalize
144
- Warning
145
- ZeroDivisionError
146
- IPAddr
67
+ Module#
68
+ Mutex#
69
+ NameError#
70
+ NilClass#
71
+ NoMemoryError#
72
+ NoMethodError#
73
+ NotImplementedError#
74
+ Numeric#
75
+ Object#
76
+ ObjectSpace#
77
+ ObjectSpace::
78
+ Proc#
79
+ Process#
80
+ Process::
81
+ Psych#
82
+ Queue#
83
+ Random#
84
+ Random::
85
+ Range#
86
+ RangeError#
87
+ Rational#
88
+ Regexp#
89
+ RegexpError#
90
+ RubyVM#
91
+ RubyVM::
92
+ RuntimeError#
93
+ ScriptError#
94
+ SecurityError#
95
+ Set#
96
+ SimpleDelegator#
97
+ Signal#
98
+ SignalException#
99
+ SizedQueue#
100
+ Socket#
101
+ StandardError#
102
+ StopIteration#
103
+ String#
104
+ Struct#
105
+ Symbol#
106
+ SyntaxError#
107
+ SystemCallError#
108
+ SystemExit#
109
+ SystemStackError#
110
+ Thread#
111
+ Thread::
112
+ ThreadError#
113
+ ThreadGroup#
114
+ Timeout
115
+ Time#
116
+ TracePoint#
117
+ TrueClass#
118
+ TypeError#
119
+ UnboundMethod#
120
+ UncaughtThrowError#
121
+ UnicodeNormalize#
122
+ Warning#
123
+ ZeroDivisionError#
124
+ IPAddr#
147
125
  Net::
148
- OpenSSL
149
- BasicSocket
150
- Forwardable
151
- Gem
152
- FFI
153
- Addrinfo
154
- Open3
155
- Shellwords
156
- WeakRef
157
- RbConfig
158
- Singleton
159
- OpenStruct
160
- Bundler
161
- Delegator
162
- PrettyPrint
163
- PP
126
+ OpenSSL#
127
+ OpenSSL::
128
+ BasicSocket#
129
+ Forwardable#
130
+ Gem#
131
+ FFI#
132
+ Addrinfo#
133
+ Open3#
134
+ Shellwords#
135
+ WeakRef#
136
+ RbConfig#
137
+ Singleton#
138
+ OpenStruct#
139
+ Bundler#
140
+ Delegator#
141
+ PrettyPrint#
142
+ PP#
143
+ PP::
144
+ PrettyPrint#
145
+ PrettyPrint::
164
146
  Minitest
147
+ Psych
148
+ Mutex_m#
149
+ ERB#
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
165
175
  }
166
176
 
167
177
  HTTP_OUT = %w{
@@ -443,7 +453,7 @@ module Raygun
443
453
  end
444
454
 
445
455
  def self.resolve_entries
446
- DEFAULT_RUBY + PROFILER + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
456
+ DEFAULT_RUBY + PROFILER + INTERNALS + HTTP_OUT + QUERIES + RAYGUN4RUBY + self.extended_blacklist.flatten
447
457
  end
448
458
  end
449
459
  end
@@ -35,7 +35,7 @@ module Raygun
35
35
  end
36
36
 
37
37
  def show_filters
38
- @tracer.show_filters# if @tracer.config.loglevel == Tracer::LOG_BLACKLIST
38
+ @tracer.show_filters if @tracer.config.loglevel == Tracer::LOG_BLACKLIST
39
39
  end
40
40
 
41
41
  def translate(filter)
@@ -4,25 +4,34 @@ require "json"
4
4
  module Raygun
5
5
  module Apm
6
6
  class Diagnostics
7
- AGENT_STATE_DOWN = "The 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_UP_MISCONFIGURED = "The 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"
9
- AGENT_STATE_UP_CONFIGURED = "The Raygun APM Agent is configured properly!"
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['Status'] == 1
20
- puts AGENT_STATE_UP_CONFIGURED
21
- elsif response['Status'] == 0
22
- puts AGENT_STATE_UP_MISCONFIGURED
21
+ if response['Version'] < Raygun::Apm::MINIMUM_AGENT_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
@@ -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
@@ -69,12 +69,16 @@ module Raygun
69
69
  end
70
70
 
71
71
  def register_known_library_paths
72
- self.register_libraries Bundler.load.specs.map(&:full_gem_path).sort << RbConfig::CONFIG['rubylibdir']
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
@@ -1,5 +1,6 @@
1
1
  module Raygun
2
2
  module Apm
3
- VERSION = "1.0.45"
3
+ VERSION = "1.0.51"
4
+ MINIMUM_AGENT_VERSION = "1.0.1186.0"
4
5
  end
5
6
  end
@@ -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 = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|vendor|tools|ext)/}) || f.match(%r{Rakefile|Gemfile|CHANGELOG|.git}) }
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.45
4
+ version: 1.0.51
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-06-26 00:00:00.000000000 Z
12
+ date: 2020-07-26 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