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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bfc77f8ea09bd4e8c493e97261b962a4b4f6227de513806b7b41beacea46118
4
- data.tar.gz: 3ab9bc87d33895f4df52ba02bb9f9dfd14364547fb9ebe4b4ef47ab1a2ef1aa0
3
+ metadata.gz: 526295c3e1f9ca3b4363e61b235d76a80974b34d293c35cd260ab3c675864aa2
4
+ data.tar.gz: b9aea4aefede1996ee91bce87ec45b009694486279e76430b4df546733ad4a53
5
5
  SHA512:
6
- metadata.gz: 2cfcd49b02a42fd0160c50584cd62c2b98664f7d416dc7935a53d72e092d96dfeead989fc58ab66f95acdde4ef48acdf7179e4dbcbe4a58906c41d6380ec700e
7
- data.tar.gz: 7d6265faff1cad2ae597f66397d192d9ed1dbbe5634d1c3aeeb1d05ac2a8548061a8023990b296bb9a23934b1d0fc396ff267eb282a265415c56e1d986dbd9af
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.after_resque_fork
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
- client = until_not_nil { HostAgentLookup.new.call }
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: 1, logger: ::Instana.logger, max_wait_tries: 60, proc_table: Sys::ProcTable, socket_proc: default_socket_proc) # rubocop:disable Metrics/ParameterLists
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.warn(e)
85
+ @logger.debug(e)
86
86
  sleep(@wait_time)
87
87
  retry
88
88
  rescue StandardError => e
@@ -32,6 +32,9 @@ module Instana
32
32
  @timer.execute
33
33
  end
34
34
 
35
+ alias start spawn_background_thread
36
+ alias after_fork spawn_background_thread
37
+
35
38
  # @return [Boolean] true if the agent able to send spans to the backend
36
39
  def ready?
37
40
  true
@@ -2,6 +2,6 @@
2
2
  # (c) Copyright Instana Inc. 2016
3
3
 
4
4
  module Instana
5
- VERSION = "1.199.1"
5
+ VERSION = "1.199.6"
6
6
  VERSION_FULL = "instana-#{VERSION}"
7
7
  end
@@ -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.1
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-04-12 00:00:00.000000000 Z
11
+ date: 2021-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler