raygun-apm 1.0.65-x64-mingw32 → 1.0.69-x64-mingw32

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: 94a4e6abc01c8302f51d373e85f759c56311ff7800458421e5fe0b83159fdf49
4
- data.tar.gz: d70aa024eb0e083657dbd5c1d6b69e087fde6ba0dd7180d2d7f7ffb8565e0124
3
+ metadata.gz: f844dbd9c6b712c2fd8c97765a60a217a58150a220ab6521f9f1ca1099c6b3ec
4
+ data.tar.gz: d1e8343b4c3e483c01c1ca3c66150af815715a6c3c168d51ebec0a2bf63fb4c3
5
5
  SHA512:
6
- metadata.gz: d8bd0a46f4d9aa04cc23dee5d95000c9e44cb394086b6de1c02ab9e669de0d768fa2dfe6350ad1af51727d890f050ca66a244aa10f30868fd5f5b7a4e9a32b53
7
- data.tar.gz: 69f743ddf6896fd2eff6e4f603f1d966fee0086890b4c82e79c7ad1f4edfd80b61547e4efce85869bff3b7700f55f181bf38cfd5cbda8c5ea84bf1e1be44dcb7
6
+ metadata.gz: 361cf026c3a67c77939e315fea526c2a4eef35851520efdd8e4f429c5db8cfbe9c9c61b76a40fda7cb6eb5564b5c03420051b566f03bc4d3a42765f71ec0d46f
7
+ data.tar.gz: ee699b17b00ba5ccc9e3d129e2879571904c9b60225fd70bc89895720c22e6f04c2fed4cce7543e3f5de0ae06c2ca3d4fca924b9ce0b31f14501c6f19660e44c
@@ -3,5 +3,4 @@
3
3
  require "bundler/setup"
4
4
  require "raygun/apm"
5
5
 
6
- check = Raygun::Apm::Diagnostics.new
7
- check.verify_agent
6
+ tracer = Raygun::Apm::Tracer.new
Binary file
Binary file
Binary file
@@ -18,8 +18,10 @@ require "raygun/apm/event"
18
18
  require "raygun/apm/hooks/internals"
19
19
  require "raygun/apm/hooks/net_http"
20
20
  # conditionally required - may not be bundled
21
- begin
22
- require "raygun/apm/hooks/httpclient"
23
- require "raygun/apm/hooks/excon"
24
- rescue LoadError
21
+ conditional_hooks = %w(httpclient excon mongodb)
22
+ conditional_hooks.each do |hook|
23
+ begin
24
+ require "raygun/apm/hooks/#{hook}"
25
+ rescue LoadError
26
+ end
25
27
  end
@@ -158,6 +158,8 @@ module Raygun
158
158
  FileUtils::
159
159
  TempFile#
160
160
  TempFile::
161
+ Logger#
162
+ Logger::
161
163
  }
162
164
 
163
165
  INTERNALS = %w{
@@ -250,6 +252,10 @@ module Raygun
250
252
  }
251
253
 
252
254
  QUERIES = %w{
255
+ #mongodb
256
+ Mongo
257
+ BSON
258
+ +Mongo::Operation::Executable#do_execute
253
259
  #redis
254
260
  Redis
255
261
  +Redis#auth
@@ -62,19 +62,18 @@ module Raygun
62
62
  config_var 'PROTON_FILE_IPC_FOLDER', as: String
63
63
  config_var 'PROTON_USE_MULTICAST', as: String, default: 'False'
64
64
  config_var 'PROTON_BATCH_IDLE_COUNTER', as: Integer, default: 500
65
+ ## New - Ruby profiler
66
+ config_var 'PROTON_UDP_HOST', as: String, default: UDP_SINK_HOST
67
+ config_var 'PROTON_UDP_PORT', as: Integer, default: UDP_SINK_PORT
65
68
 
66
- def udp_host
69
+ def proton_udp_host
67
70
  if proton_use_multicast == 'True'
68
71
  UDP_SINK_MULTICAST_HOST
69
72
  else
70
- UDP_SINK_HOST
73
+ env['PROTON_UDP_HOST'] ? env['PROTON_UDP_HOST'].to_s : UDP_SINK_HOST
71
74
  end
72
75
  end
73
76
 
74
- def udp_port
75
- UDP_SINK_PORT
76
- end
77
-
78
77
  def loglevel
79
78
  LOGLEVELS[proton_debug_loglevel] || raise(ArgumentError, "invalid log level")
80
79
  end
@@ -5,7 +5,7 @@ module Raygun
5
5
  module Apm
6
6
  class Diagnostics
7
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."
8
+ AGENT_STATE_UNKNOWN = "\nThe Raygun APM Agent is reachable, but Unable to determine the state of the Agent at the moment."
9
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
10
  AGENT_STATE_UP_CONFIGURED = "\nThe Raygun APM Agent is configured properly!"
11
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/"
@@ -4,6 +4,11 @@ module Raygun
4
4
  def inspect
5
5
  "#<#{self.class.name}:#{self.object_id}> length:#{self.length} pid:#{self[:pid]} tid:#{self[:tid]} timestamp:#{self[:timestamp]}"
6
6
  end
7
+ class ExceptionThrown < Event
8
+ def inspect
9
+ super + " class:#{self[:class_name]}"
10
+ end
11
+ end
7
12
  class ThreadStarted < Event
8
13
  def inspect
9
14
  super + " parent_tid:#{self[:parent_tid]}"
@@ -29,6 +34,11 @@ module Raygun
29
34
  super + " url:#{self[:url]} verb:#{self[:verb]} status:#{self[:status]} duration:#{self[:duration]}"
30
35
  end
31
36
  end
37
+ class Sql < Event
38
+ def inspect
39
+ super + " provider:#{self[:provider]} host:#{self[:host]} query:#{self[:query]} database:#{self[:database]} duration:#{self[:duration]}"
40
+ end
41
+ end
32
42
  class BeginTransaction < Event
33
43
  def inspect
34
44
  super + " api_key:#{self[:api_key]} technology_type:#{self[:technology_type]} process_type:#{self[:process_type]}"
@@ -0,0 +1,45 @@
1
+ require 'mongo'
2
+
3
+ module Raygun
4
+ module Apm
5
+ module Hooks
6
+ module MongoDB
7
+ def do_execute(connection, client, options = {})
8
+ result = nil
9
+ if tracer = Raygun::Apm::Tracer.instance
10
+ started = tracer.now
11
+ result = super
12
+ ended = tracer.now
13
+ event = raygun_apm_sql_event
14
+ event[:pid] = Process.pid
15
+ event[:query] = raygun_format_query(connection)
16
+ event[:provider] = "mongodb"
17
+ event[:host] = connection.address.to_s
18
+ event[:database] = client.database.name
19
+ event[:duration] = ended - started
20
+ event[:timestamp] = started
21
+ event[:tid] = tracer.get_thread_id(Thread.current)
22
+ tracer.emit(event)
23
+ result
24
+ else
25
+ super
26
+ end
27
+ end
28
+
29
+ private
30
+ def raygun_format_query(connection)
31
+ payload = message(connection).payload
32
+ return "#{payload["database_name"]}.#{payload["command_name"]} #{payload["command"]}}"
33
+ end
34
+
35
+ def raygun_apm_sql_event
36
+ @_raygun_apm_sql_event ||= Raygun::Apm::Event::Sql.new
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ Mongo::Operation.constants.each do |operation|
44
+ Mongo::Operation.const_get(operation).prepend(Raygun::Apm::Hooks::MongoDB) rescue nil
45
+ end
@@ -36,8 +36,8 @@ module Raygun
36
36
  sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_SNDBUF, Tracer::BATCH_PACKET_SIZE)
37
37
  self.udp_sink(
38
38
  socket: sock,
39
- host: config.udp_host,
40
- port: config.udp_port,
39
+ host: config.proton_udp_host,
40
+ port: config.proton_udp_port,
41
41
  receive_buffer_size: sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_RCVBUF).int
42
42
  )
43
43
  # Any fails here is kamikaze for the tracer
@@ -1,6 +1,6 @@
1
1
  module Raygun
2
2
  module Apm
3
- VERSION = "1.0.65"
3
+ VERSION = "1.0.69"
4
4
  MINIMUM_AGENT_VERSION = "1.0.1190.0"
5
5
  end
6
6
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
 
15
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
- spec.bindir = "exe"
17
+ spec.bindir = "bin"
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib", "ext"]
20
20
 
@@ -36,4 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "excon", "~> 0.73.0"
37
37
  spec.add_development_dependency "httparty", "~> 0.18.0"
38
38
  spec.add_development_dependency "httpclient", "~> 2.8.3"
39
+ spec.add_development_dependency "mongoid", "~> 7.1.2"
39
40
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.65
4
+ version: 1.0.69
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Raygun
8
8
  - Erkki Eilonen
9
9
  autorequire:
10
- bindir: exe
10
+ bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-05 00:00:00.000000000 Z
12
+ date: 2020-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debase-ruby_core_source
@@ -193,6 +193,20 @@ dependencies:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: 2.8.3
196
+ - !ruby/object:Gem::Dependency
197
+ name: mongoid
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: 7.1.2
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: 7.1.2
196
210
  description:
197
211
  email:
198
212
  - support@raygun.com
@@ -203,7 +217,7 @@ extra_rdoc_files: []
203
217
  files:
204
218
  - README.rdoc
205
219
  - bin/console
206
- - bin/diagnostics
220
+ - bin/raygun-diagnostics
207
221
  - bin/setup
208
222
  - ext/raygun/extconf.rb
209
223
  - lib/raygun/2.5/raygun_ext.so
@@ -219,6 +233,7 @@ files:
219
233
  - lib/raygun/apm/hooks/excon.rb
220
234
  - lib/raygun/apm/hooks/httpclient.rb
221
235
  - lib/raygun/apm/hooks/internals.rb
236
+ - lib/raygun/apm/hooks/mongodb.rb
222
237
  - lib/raygun/apm/hooks/net_http.rb
223
238
  - lib/raygun/apm/hooks/redis.rb
224
239
  - lib/raygun/apm/tracer.rb