raygun-apm 1.1.9-x86_64-linux → 1.1.12-x86_64-linux

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: 558377a4f7b6a8db270da8f6dabf76a17fa22c7d894fc1c7d04ade52e96b6bf9
4
- data.tar.gz: 71bc8591eb1b5d6d5e532d84e906837e3543bb5e7fa36e809770f1acb6001b53
3
+ metadata.gz: e77147d6cdb40a963fb7d0c2e9c92cde4827f948431782957acf5a6b31ab9273
4
+ data.tar.gz: e46367711f99b026b1dda930dc44ecf2eb354443573c17eb6e630378d30d0974
5
5
  SHA512:
6
- metadata.gz: 6d64a09e5928e41dde7558049b92324f1d183c181482662341a23ab7e8bac0c51f322fe8364715547be150931c9faf313c571653557f0839271a6b844c07a991
7
- data.tar.gz: 408fa6b11bf1ca27695670e3b84484230b5adb4c02680e6bf13fb80d41ebc37ebd7cbcc14b818898677e733bb4220d0d60db3a5e660f5c3f71e347985ac1959a
6
+ metadata.gz: 8af158563d2e5251501319ffd73c707fcc4d77fe83ff7d7ac70d443d453e10e5f6bee636ef7315213684a7f32ba029a1a83b96f2d96ad4589b21ea3eef94c660
7
+ data.tar.gz: 47b9665e137c6c8a4743d01fd46ef8d61bdbc0c4de880f84ce3e37347fd55de9f8f08ad1e285d47b52dce4767cd09f5a87b2e47a5c3a5bade706f77c0190bc5c
@@ -23,6 +23,7 @@ append_cflags '-Werror=switch'
23
23
  append_cflags '-std=c99'
24
24
  append_cflags '-fdeclspec'
25
25
  append_cflags '-fms-extensions'
26
+ append_cflags '-ggdb3'
26
27
  # Enables additional flags, stack protection and debug symbols
27
28
  if ENV['DEBUG']
28
29
  have_library 'ssp'
Binary file
Binary file
Binary file
Binary file
@@ -70,6 +70,9 @@ module Raygun
70
70
  config_var 'PROTON_UDP_PORT', as: Integer, default: UDP_SINK_PORT
71
71
  config_var 'PROTON_TCP_HOST', as: String, default: TCP_SINK_HOST
72
72
  config_var 'PROTON_TCP_PORT', as: Integer, default: TCP_SINK_PORT
73
+ ## Conditional hooks
74
+ config_var 'PROTON_HOOK_REDIS', as: :boolean, default: 'True'
75
+ config_var 'PROTON_HOOK_INTERNALS', as: :boolean, default: 'True'
73
76
 
74
77
  def proton_udp_host
75
78
  if proton_use_multicast == 'True'
@@ -33,4 +33,4 @@ module Raygun
33
33
  end
34
34
  end
35
35
 
36
- Excon::Connection.prepend(Raygun::Apm::Hooks::Excon)
36
+ Raygun::Apm::Tracer.patch(Excon::Connection, Raygun::Apm::Hooks::Excon)
@@ -40,4 +40,4 @@ module Raygun
40
40
  end
41
41
  end
42
42
 
43
- HTTPClient.prepend(Raygun::Apm::Hooks::HTTPClient)
43
+ Raygun::Apm::Tracer.patch(HTTPClient, Raygun::Apm::Hooks::HTTPClient)
@@ -88,8 +88,8 @@ module Raygun
88
88
  end
89
89
  end
90
90
 
91
- Object.prepend Raygun::Apm::Hooks::Object
92
- IO.prepend Raygun::Apm::Hooks::IO
93
- Random.prepend Raygun::Apm::Hooks::Random
94
- Signal.prepend Raygun::Apm::Hooks::Signal
95
- Thread::Mutex.prepend Raygun::Apm::Hooks::Mutex
91
+ Raygun::Apm::Tracer.patch(Object, Raygun::Apm::Hooks::Object)
92
+ Raygun::Apm::Tracer.patch(IO, Raygun::Apm::Hooks::IO)
93
+ Raygun::Apm::Tracer.patch(Random, Raygun::Apm::Hooks::Random)
94
+ Raygun::Apm::Tracer.patch(Signal, Raygun::Apm::Hooks::Signal)
95
+ Raygun::Apm::Tracer.patch(Thread::Mutex, Raygun::Apm::Hooks::Mutex)
@@ -41,5 +41,5 @@ module Raygun
41
41
  end
42
42
 
43
43
  Mongo::Operation.constants.each do |operation|
44
- Mongo::Operation.const_get(operation).prepend(Raygun::Apm::Hooks::MongoDB) rescue nil
44
+ Raygun::Apm::Tracer.patch(Mongo::Operation.const_get(operation), Raygun::Apm::Hooks::MongoDB) rescue nil
45
45
  end
@@ -41,4 +41,4 @@ module Raygun
41
41
  end
42
42
  end
43
43
 
44
- ::Net::HTTP.prepend(Raygun::Apm::Hooks::Net::HTTP)
44
+ Raygun::Apm::Tracer.patch(::Net::HTTP, Raygun::Apm::Hooks::Net::HTTP)
@@ -43,4 +43,4 @@ module Raygun
43
43
  end
44
44
  end
45
45
 
46
- ::Redis::Client.prepend(Raygun::Apm::Hooks::Redis)
46
+ Raygun::Apm::Tracer.patch(::Redis::Client, Raygun::Apm::Hooks::Redis)
@@ -4,8 +4,14 @@ require 'rbconfig'
4
4
  module Raygun
5
5
  module Apm
6
6
  class Tracer
7
+ @__mutex = Mutex.new
8
+
7
9
  @__pids ||= {}
8
10
  class << self
11
+ def synchronize(&block)
12
+ @__mutex.synchronize { block.call }
13
+ end
14
+
9
15
  def instance
10
16
  @__pids[Process.pid]
11
17
  end
@@ -13,6 +19,10 @@ module Raygun
13
19
  def instance=(tracer)
14
20
  @__pids[Process.pid] = tracer
15
21
  end
22
+
23
+ def patch(concern, hook)
24
+ concern.prepend(hook) unless concern.ancestors.include?(hook)
25
+ end
16
26
  end
17
27
 
18
28
  attr_accessor :config
@@ -22,6 +32,7 @@ module Raygun
22
32
  initialize_blacklist
23
33
  register_known_library_paths
24
34
  run_agent_connectivity_diagnostics
35
+ require_hooks
25
36
  ObjectSpace.define_finalizer(self, proc{ disable_tracepoints })
26
37
  # Any fails here is kamikaze for the tracer
27
38
  rescue => e
@@ -99,6 +110,22 @@ module Raygun
99
110
  check = Raygun::Apm::Diagnostics.new
100
111
  check.verify_agent(self)
101
112
  end
113
+
114
+ def require_hooks
115
+ require "raygun/apm/hooks/internals" if @config.proton_hook_internals
116
+ require "raygun/apm/hooks/net_http"
117
+ # conditionally required - may not be bundled
118
+ conditional_hooks = %w(httpclient excon mongodb)
119
+ conditional_hooks.each do |hook|
120
+ begin
121
+ require "raygun/apm/hooks/#{hook}"
122
+ rescue LoadError
123
+ end
124
+ end
125
+ if @config.proton_hook_redis
126
+ require "raygun/apm/hooks/redis" if defined?(Redis::Client)
127
+ end
128
+ end
102
129
  end
103
130
  end
104
131
  end
@@ -1,6 +1,6 @@
1
1
  module Raygun
2
2
  module Apm
3
- VERSION = "1.1.9"
3
+ VERSION = "1.1.12"
4
4
  MINIMUM_AGENT_VERSION = "1.0.1190.0"
5
5
  end
6
6
  end
data/lib/raygun/apm.rb CHANGED
@@ -16,13 +16,3 @@ require "raygun/apm/blacklist/parser"
16
16
  require "raygun/apm/blacklist/translator"
17
17
  require "raygun/apm/tracer"
18
18
  require "raygun/apm/event"
19
- require "raygun/apm/hooks/internals"
20
- require "raygun/apm/hooks/net_http"
21
- # conditionally required - may not be bundled
22
- conditional_hooks = %w(httpclient excon mongodb)
23
- conditional_hooks.each do |hook|
24
- begin
25
- require "raygun/apm/hooks/#{hook}"
26
- rescue LoadError
27
- end
28
- end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raygun-apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.12
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Raygun Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-13 00:00:00.000000000 Z
11
+ date: 2022-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source