instana 1.8.2 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +18 -25
- data/.gitignore +2 -0
- data/benchmarks/rack_vanilla_vs_traced.rb +4 -4
- data/benchmarks/stackprof_rack_tracing.rb +4 -4
- data/lib/instana/agent.rb +1 -1
- data/lib/instana/instrumentation/rack.rb +2 -2
- data/lib/instana/tracer.rb +1 -1
- data/lib/instana/tracing/processor.rb +1 -1
- data/lib/instana/util.rb +12 -19
- 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: dfcd505f3b03f60468ec22cc0b83f7db3d8247ab6d43d64fc2102b1998eb125c
|
4
|
+
data.tar.gz: c89980fb311fa8106cdf5cfe63f12c517ebd91f0971d26bec2f7f53d03b2629e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e1107b870b00d6b5c488a9def75a77daab3b9250b879ff9a6b5c0265a239e5397f564dd879b404b2fb3c4c46b414ccea49e67a9e7677efb4e9efe791168651b
|
7
|
+
data.tar.gz: 92f5f8acbd672ac8c5b0984a85cbb69944aaaab372007f105819cdfb29ec5ca40415d6ff14fa4751fc3a1bd62cf27a1fe000a93c353383b7a2d7331d40c6752d
|
data/.codeclimate.yml
CHANGED
@@ -1,30 +1,23 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
enabled: false
|
1
|
+
version: "2"
|
2
|
+
checks:
|
3
|
+
complex-logic:
|
5
4
|
config:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
@@ -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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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.
|
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
|
-
#
|
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)
|
data/lib/instana/tracer.rb
CHANGED
@@ -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(
|
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.
|
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
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
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
|
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.8.
|
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-
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|