instana 1.10.3 → 1.10.4

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: 79acb521d7fb12370fa1b4b69b4d48512214138ad76c60539b2f16863e955481
4
- data.tar.gz: 374d235f20bb9c82d9e5e9d3b0d735c76e8c59e121d2f515b811fbe8a0c11b0c
3
+ metadata.gz: 66eea5baa9086f0be88ec5bb7f8502e3cdaafaf7b3b8648571584293fe9b674d
4
+ data.tar.gz: 3302565c8feac78f09954dedc1df328c62baa0f5f3a0992a5e456124f96920bf
5
5
  SHA512:
6
- metadata.gz: 40422237e109b69128283e16053b5a6953897a7b108fedbc70c072a025a645a6c10b466b723fe028aba332960da2809ce3b65a2ffed9bcbbb7728a466b6877a4
7
- data.tar.gz: cb5d9ec34fff06c9886a95e0191cf72527ed004984001cad4f993840ba1a856d719d6f29e991ace9eca23f07530197b0c0d53b2e035ebf6b95e378fe80d6cec7
6
+ metadata.gz: f89823c2bbf24e4d41ea2756b639910d58ee991ed7144b4c47263f563e2fbd00f08cf4660c629953b9615f2696fa52d74e0f6cf26d95fd63b3b4eed8d8ef1a38
7
+ data.tar.gz: 8ff69135b822c9027819cbd8bcf3757aba741455587519afc7ecbca4a24a11d4549b103a542de153374ebfe35373cd4ae94b15c73e0bb29f22d8f3049e55caf7
data/lib/instana/agent.rb CHANGED
@@ -114,6 +114,10 @@ module Instana
114
114
 
115
115
  # Sets up periodic timers and starts the agent in a background thread.
116
116
  #
117
+ # There are three possible states for the agent:
118
+ # - :unannounced
119
+ # - :announced
120
+ # - :ready
117
121
  def setup
118
122
  # The announce timer
119
123
  # We attempt to announce this ruby sensor to the host agent.
@@ -199,8 +203,7 @@ module Instana
199
203
  ::Instana.logger.debug { e.backtrace.join("\r\n") }
200
204
  ensure
201
205
  if @state == :ready
202
- # Pause the timers so they don't fire while we are
203
- # reporting traces
206
+ # Pause the timers so they don't fire while we are reporting traces
204
207
  @announce_timer.pause
205
208
  @pending_timer.pause
206
209
  @collect_timer.pause
@@ -457,8 +460,7 @@ module Instana
457
460
  rescue Errno::ECONNREFUSED
458
461
  return nil
459
462
  rescue => e
460
- Instana.logger.debug { "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" }
461
- Instana.logger.debug { e.backtrace.join("\r\n") } unless @testmode
463
+ Instana.logger.debug { "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message} (to #{req.uri})" }
462
464
  return nil
463
465
  end
464
466
  end
@@ -5,6 +5,8 @@ module AgentHooks
5
5
  def after_fork
6
6
  ::Instana.logger.debug "after_fork hook called. Falling back to unannounced state and spawning a new background agent thread."
7
7
 
8
+ @timers.cancel
9
+
8
10
  # Reseed the random number generator for this
9
11
  # new thread.
10
12
  srand
@@ -23,6 +25,8 @@ module AgentHooks
23
25
  def after_resque_fork
24
26
  ::Instana.logger.debug "after_resque_fork hook called. pid/ppid: #{Process.pid}/#{Process.ppid}"
25
27
 
28
+ @timers.cancel
29
+
26
30
  # Reseed the random number generator for this
27
31
  # new thread.
28
32
  srand
@@ -4,11 +4,13 @@ module Instana
4
4
  def initialize
5
5
  @config = {}
6
6
  if ENV.key?('INSTANA_AGENT_HOST')
7
+ ::Instana.logger.debug "Using custom agent host location specified in INSTANA_AGENT_HOST (#{ENV['INSTANA_AGENT_HOST']})"
7
8
  @config[:agent_host] = ENV['INSTANA_AGENT_HOST']
8
9
  else
9
10
  @config[:agent_host] = '127.0.0.1'
10
11
  end
11
12
  if ENV.key?('INSTANA_AGENT_PORT')
13
+ ::Instana.logger.debug "Using custom agent port specified in INSTANA_AGENT_PORT (#{ENV['INSTANA_AGENT_PORT']})"
12
14
  @config[:agent_port] = ENV['INSTANA_AGENT_PORT']
13
15
  else
14
16
  @config[:agent_port] = 42699
@@ -36,13 +36,6 @@ if defined?(::Net::HTTP) && ::Instana.config[:nethttp][:enabled]
36
36
  # The core call
37
37
  response = request_without_instana(*args, &block)
38
38
 
39
- # Debug only check: Pickup response headers; convert back to base 10 integer and validate
40
- if ENV.key?('INSTANA_DEBUG') && response.key?('X-Instana-T')
41
- if ::Instana.tracer.trace_id != ::Instana::Util.header_to_id(response.header['X-Instana-T'])
42
- ::Instana.logger.debug "#{Thread.current}: Trace ID mismatch on net/http response! ours: #{::Instana.tracer.trace_id} theirs: #{their_trace_id}"
43
- end
44
- end
45
-
46
39
  kv_payload[:http][:status] = response.code
47
40
  if response.code.to_i.between?(500, 511)
48
41
  # Because of the 5xx response, we flag this span as errored but
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.10.3"
2
+ VERSION = "1.10.4"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.3
4
+ version: 1.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Giacomo Lombardo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-16 00:00:00.000000000 Z
11
+ date: 2019-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler