instana 1.8.2 → 1.8.3

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: 70aba01058245eba20a35a5dfcfc91579a82b61a8f69a347d463da712c2e7d4c
4
- data.tar.gz: e6f53ded2af3e7630b8033a51d22b9983711eb1e90a81314997db6b8dd3cd404
3
+ metadata.gz: dfcd505f3b03f60468ec22cc0b83f7db3d8247ab6d43d64fc2102b1998eb125c
4
+ data.tar.gz: c89980fb311fa8106cdf5cfe63f12c517ebd91f0971d26bec2f7f53d03b2629e
5
5
  SHA512:
6
- metadata.gz: 7a407ae589c8b4bcd7760a710f0bf8b5ab4966b221a22af04d538e81cd27294af677b23278d8ece2736befc810a715b40de3c1d2e5ae16cc720bfa7b23dd788b
7
- data.tar.gz: db62ff5d7636374b39d7fd3bcb9577090a4a1f467cab138b989a6d1e11cea7651fe119df9f6d1b94fa8d01cb11004249ca6d829d974c1f46528c362dea879a99
6
+ metadata.gz: 6e1107b870b00d6b5c488a9def75a77daab3b9250b879ff9a6b5c0265a239e5397f564dd879b404b2fb3c4c46b414ccea49e67a9e7677efb4e9efe791168651b
7
+ data.tar.gz: 92f5f8acbd672ac8c5b0984a85cbb69944aaaab372007f105819cdfb29ec5ca40415d6ff14fa4751fc3a1bd62cf27a1fe000a93c353383b7a2d7331d40c6752d
data/.codeclimate.yml CHANGED
@@ -1,30 +1,23 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: false
1
+ version: "2"
2
+ checks:
3
+ complex-logic:
5
4
  config:
6
- languages:
7
- - ruby
8
- - javascript
9
- - python
10
- - php
5
+ threshold: 12
6
+ file-lines:
7
+ config:
8
+ threshold: 325
9
+ method-complexity:
10
+ config:
11
+ threshold: 12
12
+ method-lines:
13
+ config:
14
+ threshold: 50
15
+ method-count:
16
+ config:
17
+ threshold: 30
18
+
19
+ plugins:
11
20
  fixme:
12
21
  enabled: true
13
22
  rubocop:
14
23
  enabled: true
15
- checks:
16
- Rubocop/Metrics/CyclomaticComplexity:
17
- enabled: false
18
- Rubocop/Lint/RescueException:
19
- enabled: false
20
- ratings:
21
- paths:
22
- - "**.inc"
23
- - "**.js"
24
- - "**.jsx"
25
- - "**.module"
26
- - "**.php"
27
- - "**.py"
28
- - "**.rb"
29
- exclude_paths:
30
- - test/
data/.gitignore CHANGED
@@ -11,3 +11,5 @@
11
11
  .ruby-version
12
12
  gemfiles/*.lock
13
13
  /test/tmp/*.pid
14
+ .idea
15
+ *.iml
@@ -12,12 +12,12 @@ require "instana/rack"
12
12
  Thread.new do
13
13
  app = Rack::Builder.new {
14
14
  map "/" do
15
- run Proc.new { |env|
15
+ run Proc.new {
16
16
  [200, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"scene!\"]"]]
17
17
  }
18
18
  end
19
19
  map "/error" do
20
- run Proc.new { |env|
20
+ run Proc.new {
21
21
  [500, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"error!\"]"]]
22
22
  }
23
23
  end
@@ -30,12 +30,12 @@ Thread.new do
30
30
  app = Rack::Builder.new {
31
31
  use ::Instana::Rack
32
32
  map "/" do
33
- run Proc.new { |env|
33
+ run Proc.new {
34
34
  [200, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"scene!\"]"]]
35
35
  }
36
36
  end
37
37
  map "/error" do
38
- run Proc.new { |env|
38
+ run Proc.new {
39
39
  [500, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"error!\"]"]]
40
40
  }
41
41
  end
@@ -12,12 +12,12 @@ require "instana/rack"
12
12
  Thread.new do
13
13
  app = Rack::Builder.new {
14
14
  map "/" do
15
- run Proc.new { |env|
15
+ run Proc.new {
16
16
  [200, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"scene!\"]"]]
17
17
  }
18
18
  end
19
19
  map "/error" do
20
- run Proc.new { |env|
20
+ run Proc.new {
21
21
  [500, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"error!\"]"]]
22
22
  }
23
23
  end
@@ -30,12 +30,12 @@ Thread.new do
30
30
  app = Rack::Builder.new {
31
31
  use ::Instana::Rack
32
32
  map "/" do
33
- run Proc.new { |env|
33
+ run Proc.new {
34
34
  [200, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"scene!\"]"]]
35
35
  }
36
36
  end
37
37
  map "/error" do
38
- run Proc.new { |env|
38
+ run Proc.new {
39
39
  [500, {"Content-Type" => "application/json"}, ["[\"Stan\",\"is\",\"on\",\"the\",\"error!\"]"]]
40
40
  }
41
41
  end
data/lib/instana/agent.rb CHANGED
@@ -118,7 +118,7 @@ module Instana
118
118
  # The announce timer
119
119
  # We attempt to announce this ruby sensor to the host agent.
120
120
  # In case of failure, we try again in 30 seconds.
121
- @announce_timer = @timers.now_and_every(30) do
121
+ @announce_timer = @timers.every(30) do
122
122
  if @state == :unannounced
123
123
  if host_agent_ready? && announce_sensor
124
124
  transition_to(:announced)
@@ -1,4 +1,4 @@
1
- # FIXME: We really only need "cgi/util" here but Ruby 2.4.1 has an issue:
1
+ # Note: We really only need "cgi/util" here but Ruby 2.4.1 has an issue:
2
2
  # https://bugs.ruby-lang.org/issues/13539
3
3
  require "cgi"
4
4
 
@@ -20,7 +20,7 @@ module Instana
20
20
  end
21
21
 
22
22
  if ::Instana.agent.extra_headers
23
- for custom_header in agent.extra_headers
23
+ for custom_header in ::Instana.agent.extra_headers
24
24
  # Headers are available in this format: HTTP_X_CAPTURE_THIS
25
25
  rack_header = ('HTTP_' + custom_header.upcase).gsub('-', '_')
26
26
  if env.key?(rack_header)
@@ -242,7 +242,7 @@ module Instana
242
242
  # @param span [Span] the span for this Async op (previously returned
243
243
  # from `log_async_entry`)
244
244
  #
245
- def log_async_exit(name, kvs, span)
245
+ def log_async_exit(_name, kvs, span)
246
246
  # An asynchronous span can end after the current trace has
247
247
  # already completed so we make sure that we end the span
248
248
  # on the right trace.
@@ -84,7 +84,7 @@ module Instana
84
84
  return if @queue.empty? || ENV['INSTANA_GEM_TEST']
85
85
 
86
86
  size = @queue.size
87
- if size > 100
87
+ if size > 200
88
88
  Instana.logger.debug "Trace queue is #{size}"
89
89
  end
90
90
 
data/lib/instana/util.rb CHANGED
@@ -48,29 +48,22 @@ module Instana
48
48
  # Only valid for development or test environments
49
49
  #env = ENV['RACK_ENV'] || ENV['RAILS_ENV']
50
50
  #return unless %w(development, test).include? env
51
+ require 'pry-byebug'
51
52
 
52
- if RUBY_VERSION > '1.8.7'
53
- begin
54
- require 'pry-byebug'
53
+ if defined?(PryByebug)
54
+ Pry.commands.alias_command 'c', 'continue'
55
+ Pry.commands.alias_command 's', 'step'
56
+ Pry.commands.alias_command 'n', 'next'
57
+ Pry.commands.alias_command 'f', 'finish'
55
58
 
56
- if defined?(PryByebug)
57
- Pry.commands.alias_command 'c', 'continue'
58
- Pry.commands.alias_command 's', 'step'
59
- Pry.commands.alias_command 'n', 'next'
60
- Pry.commands.alias_command 'f', 'finish'
61
-
62
- Pry::Commands.command(/^$/, 'repeat last command') do
63
- _pry_.run_command Pry.history.to_a.last
64
- end
65
- end
66
-
67
- binding.pry
68
- rescue LoadError
69
- ::Instana.logger.warn("No debugger in bundle. Couldn't load pry-byebug.")
59
+ Pry::Commands.command(/^$/, 'repeat last command') do
60
+ _pry_.run_command Pry.history.to_a.last
70
61
  end
71
- else
72
- require 'ruby-debug'; debugger
73
62
  end
63
+
64
+ binding.pry
65
+ rescue LoadError
66
+ ::Instana.logger.warn("No debugger in bundle. Couldn't load pry-byebug.")
74
67
  end
75
68
 
76
69
  # Retrieves and returns the source code for any ruby
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.8.2"
2
+ VERSION = "1.8.3"
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.8.2
4
+ version: 1.8.3
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: 2018-09-12 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler