instana 1.10.3-java → 1.10.4-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/instana/agent.rb +6 -4
- data/lib/instana/agent/hooks.rb +4 -0
- data/lib/instana/config.rb +2 -0
- data/lib/instana/instrumentation/net-http.rb +0 -7
- data/lib/instana/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 346cd335b9d396c17a51bae447c174e8fc7a51b7b50d8ca9cf529edf8f8f79af
|
4
|
+
data.tar.gz: bd715a791082dc0cf60d4de992be8aea223dfe4a4cf91e4f91693020754939c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fbd3d312c7d3761633d8f2895b68052495775a166a823fcc3b524be2246f3d10316aedcb0e70b87e39e8a1490cdb58fc51b58e78da09bf2c667c468ad1fadaf
|
7
|
+
data.tar.gz: 8b78f6772d7325baadb37c34f02e1ec4d35909d07f16674fc1e58c1a1f6f933abac8a9ddb16cfcef8fe7fdaff439c79e031e253b38d888ecde1f1864c70cb84b
|
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
|
data/lib/instana/agent/hooks.rb
CHANGED
@@ -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
|
data/lib/instana/config.rb
CHANGED
@@ -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
|
data/lib/instana/version.rb
CHANGED
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.
|
4
|
+
version: 1.10.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Peter Giacomo Lombardo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|