instana 1.10.0.slimfast → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 636d84b9e35dfd6f03f1186ecda22b22b96105725007ca2f48dccc41198782f7
4
- data.tar.gz: 16842c4bacc3cac2c347babee2653fbfd3462fb0ee466b5317d22167465088ab
3
+ metadata.gz: adc4cb8ce42b827dfc8b08f0e52de9950ca1c57f9ede6ec86259ac9a81ff3ce0
4
+ data.tar.gz: 5b0c1b1afbb4f5d76db69aa88dc8e610e23e1e11babe04f6f0c0242e8a5ae05a
5
5
  SHA512:
6
- metadata.gz: e30db43f11f5b3574405ef02ce18c1bb755bad5b0b5e28bd3f8d5a74846b9feeb08e0541f66a74bb174cb4c01be889ab896a34b988d26ab93577f4de2561c34a
7
- data.tar.gz: 2cc0b8257cdb95df46fa3955c081a12188d7abf4f0a639929f50264b94961fa61bb9de4f092cf04d0144c985d4a871084114aaad14ad1b7671dea908b4a3bd43
6
+ metadata.gz: 8c11d0557caf968f3a238821825d08fa8a3a555d4e38cedaefb2f2db958e0300dede11da2d526bdfee03ec87fa3ff5400b5b93adab190e72bb9bd70f3f6230e3
7
+ data.tar.gz: 44708267befb20198a8bef872d09977ee033a7789c63c042f0b78d87549d4df47fa589501158d5e71d6c32b3fcf025f1706771513f43b366087d0ac43808cf8a
data/benchmarks/Gemfile CHANGED
@@ -3,5 +3,9 @@ source "https://rubygems.org"
3
3
 
4
4
  git_source(:github) {|repo_name| "https://github.com/instana/#{repo_name}" }
5
5
 
6
+ gem "puma"
7
+ gem "rack"
8
+ gem "ruby-prof"
9
+
6
10
  gem "instana", :path => "~/Projects/instana/ruby-sensor"
7
11
 
data/lib/instana/agent.rb CHANGED
@@ -176,7 +176,7 @@ module Instana
176
176
  @collect_timer.pause
177
177
  @announce_timer.pause
178
178
 
179
- ::Instana.logger.debug { "#{Thread.current}: Agent exiting. Reporting final #{::Instana.processor.queue_count} trace(s)." }
179
+ ::Instana.logger.debug { "#{Thread.current}: Agent exiting. Reporting final spans (if any)." }
180
180
  ::Instana.processor.send
181
181
  end
182
182
  end
@@ -44,9 +44,12 @@ module AgentHelpers
44
44
  # In test, we're always ready :-)
45
45
  return true if ENV.key?('INSTANA_TEST')
46
46
 
47
- if !@is_resque_worker && forked?
48
- ::Instana.logger.debug "Instana: detected fork. (this pid: #{Process.pid}/#{Process.ppid}) Calling after_fork"
49
- after_fork
47
+ # Occasionally Run Fork detection
48
+ if rand(10) > 8
49
+ if !@is_resque_worker && (@process[:pid] != Process.pid)
50
+ ::Instana.logger.debug "Instana: detected fork. (this pid: #{Process.pid}/#{Process.ppid}) Calling after_fork"
51
+ after_fork
52
+ end
50
53
  end
51
54
 
52
55
  @state == :announced
@@ -42,14 +42,26 @@ module Instana
42
42
  name = "Default"
43
43
  end
44
44
  end
45
- name ||= opts[:template]
46
- name ||= opts[:file]
47
- name = "Nothing" if opts[:nothing]
48
- name = "Plaintext" if opts[:plain]
49
- name = "JSON" if opts[:json]
50
- name = "XML" if opts[:xml]
51
- name = "Raw" if opts[:body]
52
- name = "Javascript" if opts[:js]
45
+
46
+ return name if name
47
+
48
+ if opts.key?(:template)
49
+ name ||= opts[:template]
50
+ elsif opts.key?(:file)
51
+ name ||= opts[:file]
52
+ elsif opts.key?(:nothing)
53
+ name = "Nothing"
54
+ elsif opts.key?(:plain)
55
+ name = "Plaintext"
56
+ elsif opts.key?(:json)
57
+ name = "JSON"
58
+ elsif opts.key?(:xml)
59
+ name = "XML"
60
+ elsif opts.key?(:body)
61
+ name = "Raw"
62
+ elsif opts.key?(:js)
63
+ name = "Javascript"
64
+ end
53
65
  name
54
66
  end
55
67
  end
@@ -82,13 +82,13 @@ module Instana
82
82
  #
83
83
  def log_start_or_continue(name, kvs = {}, incoming_context = nil)
84
84
  return if !::Instana.agent.ready? || !::Instana.config[:tracing][:enabled]
85
- ::Instana.logger.debug "#{__method__} passed a block. Use `start_or_continue` instead!" if block_given?
85
+ ::Instana.logger.debug { "#{__method__} passed a block. Use `start_or_continue` instead!" } if block_given?
86
86
 
87
87
  # Handle the potential variations on `incoming_context`
88
88
  if incoming_context
89
89
  if incoming_context.is_a?(Hash)
90
90
  if !incoming_context.empty?
91
- parent_context = SpanContext.new(incoming_context[:trace_id], incoming_context[:span_id])
91
+ parent_context = SpanContext.new(incoming_context[:trace_id], incoming_context[:span_id], incoming_context[:level])
92
92
  end
93
93
  else
94
94
  parent_context = incoming_context
@@ -17,10 +17,6 @@ module Instana
17
17
  #
18
18
  # @param [spans] - the trace to be added to the queue
19
19
  def add_spans(spans)
20
- # Do a quick checkup on our background thread.
21
- if ::Instana.agent.collect_thread.nil? || !::Instana.agent.collect_thread.alive?
22
- ::Instana.agent.spawn_background_thread
23
- end
24
20
  spans.each { |span| @queue.push(span)}
25
21
  end
26
22
 
@@ -28,9 +24,11 @@ module Instana
28
24
  #
29
25
  # @param [Trace] - the trace to be added to the queue
30
26
  def add_span(span)
31
- # Do a quick checkup on our background thread.
32
- if ::Instana.agent.collect_thread.nil? || !::Instana.agent.collect_thread.alive?
33
- ::Instana.agent.spawn_background_thread
27
+ # Occasionally, do a checkup on our background thread.
28
+ if rand(10) > 8
29
+ if ::Instana.agent.collect_thread.nil? || !::Instana.agent.collect_thread.alive?
30
+ ::Instana.agent.spawn_background_thread
31
+ end
34
32
  end
35
33
  @queue.push(span)
36
34
  end
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.10.0.slimfast"
2
+ VERSION = "1.10.0"
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.0.slimfast
4
+ version: 1.10.0
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-08-15 00:00:00.000000000 Z
11
+ date: 2019-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -310,9 +310,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
310
310
  version: '2.1'
311
311
  required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  requirements:
313
- - - ">"
313
+ - - ">="
314
314
  - !ruby/object:Gem::Version
315
- version: 1.3.1
315
+ version: '0'
316
316
  requirements: []
317
317
  rubygems_version: 3.0.3
318
318
  signing_key: