instana 1.199.1 → 1.199.6
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 +4 -4
- data/lib/instana/activators/resque_worker.rb +1 -4
- data/lib/instana/backend/host_agent.rb +16 -8
- data/lib/instana/backend/host_agent_activation_observer.rb +2 -2
- data/lib/instana/backend/serverless_agent.rb +3 -0
- data/lib/instana/version.rb +1 -1
- data/test/backend/host_agent_test.rb +10 -0
- data/test/backend/serverless_agent_test.rb +10 -0
- data/test/secrets_test.rb +0 -2
- 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: 526295c3e1f9ca3b4363e61b235d76a80974b34d293c35cd260ab3c675864aa2
|
4
|
+
data.tar.gz: b9aea4aefede1996ee91bce87ec45b009694486279e76430b4df546733ad4a53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f090f6841a6ce59e4f4c0adeb6ccb5bec5691447a099610651460744ff15dae0b589a801f3e8ee89468ee0bd6df440b57ae4619e9ed0fb6fca07e79af9c4ca2d
|
7
|
+
data.tar.gz: 4010db830f3fc6d31a775d752be1075d7aa2aa6620a1abeba4298294a8878f17b0b88b4f06e5d7f059b353ef1a1a8d5cce774aa56ccc11366b2a61e2487f2940
|
@@ -16,11 +16,8 @@ module Instana
|
|
16
16
|
::Resque::Worker.prepend(::Instana::Instrumentation::ResqueWorker)
|
17
17
|
::Resque::Job.prepend(::Instana::Instrumentation::ResqueJob)
|
18
18
|
|
19
|
-
::Resque.before_fork do |_job|
|
20
|
-
::Instana.agent.before_resque_fork
|
21
|
-
end
|
22
19
|
::Resque.after_fork do |_job|
|
23
|
-
::Instana.agent.
|
20
|
+
::Instana.agent.after_fork
|
24
21
|
end
|
25
22
|
|
26
23
|
# Set this so we assure that any remaining collected traces are reported at_exit
|
@@ -19,17 +19,25 @@ module Instana
|
|
19
19
|
return if ENV.key?('INSTANA_TEST')
|
20
20
|
|
21
21
|
@future = Concurrent::Promises.future do
|
22
|
-
|
23
|
-
@discovery.delete_observers
|
24
|
-
@discovery
|
25
|
-
.with_observer(HostAgentActivationObserver.new(client, @discovery))
|
26
|
-
.with_observer(HostAgentReportingObserver.new(client, @discovery))
|
27
|
-
|
28
|
-
@discovery.swap { nil }
|
29
|
-
client
|
22
|
+
announce
|
30
23
|
end
|
31
24
|
end
|
32
25
|
|
26
|
+
alias start spawn_background_thread
|
27
|
+
|
28
|
+
def announce
|
29
|
+
client = until_not_nil { HostAgentLookup.new.call }
|
30
|
+
@discovery.delete_observers
|
31
|
+
@discovery
|
32
|
+
.with_observer(HostAgentActivationObserver.new(client, @discovery))
|
33
|
+
.with_observer(HostAgentReportingObserver.new(client, @discovery))
|
34
|
+
|
35
|
+
@discovery.swap { nil }
|
36
|
+
client
|
37
|
+
end
|
38
|
+
|
39
|
+
alias after_fork announce
|
40
|
+
|
33
41
|
# @return [Boolean] true if the agent able to send spans to the backend
|
34
42
|
def ready?
|
35
43
|
ENV.key?('INSTANA_TEST') || !@discovery.value.nil?
|
@@ -12,7 +12,7 @@ module Instana
|
|
12
12
|
|
13
13
|
# @param [RequestClient] client used to make requests to the backend
|
14
14
|
# @param [Concurrent::Atom] discovery object used to store discovery response in
|
15
|
-
def initialize(client, discovery, wait_time:
|
15
|
+
def initialize(client, discovery, wait_time: 30, logger: ::Instana.logger, max_wait_tries: 60, proc_table: Sys::ProcTable, socket_proc: default_socket_proc) # rubocop:disable Metrics/ParameterLists
|
16
16
|
@client = client
|
17
17
|
@discovery = discovery
|
18
18
|
@wait_time = wait_time
|
@@ -82,7 +82,7 @@ module Instana
|
|
82
82
|
def try_forever_with_backoff
|
83
83
|
yield
|
84
84
|
rescue DiscoveryError, Net::OpenTimeout => e
|
85
|
-
@logger.
|
85
|
+
@logger.debug(e)
|
86
86
|
sleep(@wait_time)
|
87
87
|
retry
|
88
88
|
rescue StandardError => e
|
data/lib/instana/version.rb
CHANGED
@@ -44,4 +44,14 @@ class HostAgentTest < Minitest::Test
|
|
44
44
|
subject = Instana::Backend::HostAgent.new(discovery: discovery)
|
45
45
|
assert_equal 1, subject.source[:e]
|
46
46
|
end
|
47
|
+
|
48
|
+
def test_start
|
49
|
+
subject = Instana::Backend::HostAgent.new
|
50
|
+
assert subject.respond_to? :start
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_after_fork
|
54
|
+
subject = Instana::Backend::HostAgent.new
|
55
|
+
assert subject.respond_to? :after_fork
|
56
|
+
end
|
47
57
|
end
|
@@ -70,4 +70,14 @@ class ServerlesAgentTest < Minitest::Test
|
|
70
70
|
|
71
71
|
subject.timer.block.call
|
72
72
|
end
|
73
|
+
|
74
|
+
def test_start
|
75
|
+
subject = Instana::Backend::ServerlessAgent.new([], timer_class: MockTimer, backend_uri: 'http://10.10.10.10:9292/', logger: Logger.new('/dev/null'))
|
76
|
+
assert subject.respond_to? :start
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_after_fork
|
80
|
+
subject = Instana::Backend::ServerlessAgent.new([], timer_class: MockTimer, backend_uri: 'http://10.10.10.10:9292/', logger: Logger.new('/dev/null'))
|
81
|
+
assert subject.respond_to? :after_fork
|
82
|
+
end
|
73
83
|
end
|
data/test/secrets_test.rb
CHANGED
@@ -98,8 +98,6 @@ class SecretsTest < Minitest::Test
|
|
98
98
|
|
99
99
|
def assert_redacted(str, keys, raw_str: false)
|
100
100
|
params = raw_str ? CGI.parse(str) : CGI.parse(URI(str).query)
|
101
|
-
pp params
|
102
|
-
|
103
101
|
assert_equal keys, params.select { |_, v| v == %w(<redacted>) }.keys, 'to be redacted'
|
104
102
|
end
|
105
103
|
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.199.
|
4
|
+
version: 1.199.6
|
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: 2021-
|
11
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|