raygun-apm 1.1.6-x86_64-linux → 1.1.10-x86_64-linux

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: eeeab423c5b80245ef2dc64bc0baba78aef3603beab57e73bc950d90631d6656
4
- data.tar.gz: a6ec9352f246604bae73a9d9cad7ceff89a6daa0ab8f5725a0c15d2d627b66ef
3
+ metadata.gz: 9899c704b83082a4464e08beef065cf11bc3af3cbdce1bbcf9baee6f458cc50f
4
+ data.tar.gz: c5ffeeaca7ae073a268fea1215d5dc25b7f6d8fc9b0167f1dd1f2626a4feb2fe
5
5
  SHA512:
6
- metadata.gz: 2c2e1ebc0d7aae3e3b019481e09224960f8cd1c5b6a7b57b0658003223f39c061b871fd780fb009fad7a92d23b7f8de8d245f27946902bc240f5d8d61012d42a
7
- data.tar.gz: 1905f78d20f28111d12e4f7cb58283d3887b2ac318629e08cb184168847b11c7b7bf9b606f9ee845f8f0c80fa6f1577e0ee6f5ddcfddb94dc2bc67304e00a762
6
+ metadata.gz: 31d8d894e0451b798494ec0eaee57a59b7b967188b4ca9994566e066715b6e29c2da2e9636e29defd53f86a79a49ff42c5cd29e5060ce9e2d3701b7541ccbbc1
7
+ data.tar.gz: ecea89b76da510c2001e14a36a5ff535976270a38ec68049cca7ff755d01f3b7f745d1275f8f735b743ac355e5322f262dde21e0b156adb68177f316191859ab
Binary file
Binary file
Binary file
Binary file
@@ -52,9 +52,9 @@ module Raygun
52
52
  end
53
53
 
54
54
  # Initial constants for ProtonAgentTail.exe
55
- UDP_SINK_HOST = TCP_MANAGEMENT_HOST = '127.0.0.1'
55
+ UDP_SINK_HOST = TCP_SINK_HOST = TCP_MANAGEMENT_HOST = '127.0.0.1'
56
56
  UDP_SINK_MULTICAST_HOST = '239.100.15.215'
57
- UDP_SINK_PORT = 2799
57
+ UDP_SINK_PORT = TCP_SINK_PORT = 2799
58
58
  TCP_MANAGEMENT_PORT = 2790
59
59
 
60
60
  ## Enumerate all PROTON_ constants
@@ -68,6 +68,8 @@ module Raygun
68
68
  ## New - Ruby profiler
69
69
  config_var 'PROTON_UDP_HOST', as: String, default: UDP_SINK_HOST
70
70
  config_var 'PROTON_UDP_PORT', as: Integer, default: UDP_SINK_PORT
71
+ config_var 'PROTON_TCP_HOST', as: String, default: TCP_SINK_HOST
72
+ config_var 'PROTON_TCP_PORT', as: Integer, default: TCP_SINK_PORT
71
73
 
72
74
  def proton_udp_host
73
75
  if proton_use_multicast == 'True'
@@ -77,6 +79,10 @@ module Raygun
77
79
  end
78
80
  end
79
81
 
82
+ def proton_tcp_host
83
+ env['PROTON_TCP_HOST'] ? env['PROTON_TCP_HOST'].to_s : TCP_SINK_HOST
84
+ end
85
+
80
86
  def loglevel
81
87
  LOGLEVELS[proton_debug_loglevel] || raise(ArgumentError, "invalid log level")
82
88
  end
@@ -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
@@ -30,7 +36,6 @@ module Raygun
30
36
  end
31
37
 
32
38
  def udp_sink!
33
- require "socket"
34
39
  sock = UDPSocket.new
35
40
  # For UDP sockets, SO_SNDBUF is the max packet size and NOT send buffer as with a connection oriented transport
36
41
  sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_SNDBUF, Tracer::BATCH_PACKET_SIZE)
@@ -40,12 +45,29 @@ module Raygun
40
45
  port: config.proton_udp_port,
41
46
  receive_buffer_size: sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_RCVBUF).int
42
47
  )
43
- # Any fails here is kamikaze for the tracer
44
48
  rescue => e
45
49
  # XXX works for the middleware wrapped case, not for standalone - revisit
46
50
  raise Raygun::Apm::FatalError, "Raygun APM UDP sink could not be initialized: #{e.message} #{e.backtrace.join("\n")}"
47
51
  end
48
52
 
53
+ def tcp_sink!
54
+ self.tcp_sink(
55
+ host: config.proton_tcp_host,
56
+ port: config.proton_tcp_port
57
+ )
58
+ rescue => e
59
+ # XXX works for the middleware wrapped case, not for standalone - revisit
60
+ raise Raygun::Apm::FatalError, "Raygun APM TCP sink could not be initialized: #{e.message} #{e.backtrace.join("\n")}"
61
+ end
62
+
63
+ def enable_sink!
64
+ if config.proton_network_mode == "Udp"
65
+ udp_sink!
66
+ elsif config.proton_network_mode == "Tcp"
67
+ tcp_sink!
68
+ end
69
+ end
70
+
49
71
  private
50
72
  def configure(env)
51
73
  @config = Config.new(env)
@@ -1,6 +1,6 @@
1
1
  module Raygun
2
2
  module Apm
3
- VERSION = "1.1.6"
3
+ VERSION = "1.1.10"
4
4
  MINIMUM_AGENT_VERSION = "1.0.1190.0"
5
5
  end
6
6
  end
data/lib/raygun/apm.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "raygun/apm/version"
2
+ require "socket"
2
3
 
3
4
  begin
4
5
  # Attempt to load a precompiled shared object (released gem)
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.6
4
+ version: 1.1.10
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: 2021-12-10 00:00:00.000000000 Z
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase-ruby_core_source