instana 1.203.1 → 1.204.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/instana/activators/action_mailer.rb +1 -1
- data/lib/instana/secrets.rb +1 -1
- data/lib/instana/tracing/processor.rb +1 -0
- data/lib/instana/tracing/span.rb +10 -28
- data/lib/instana/version.rb +1 -1
- data/test/instrumentation/net_http_test.rb +18 -0
- data/test/secrets_test.rb +9 -0
- 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: 16c9cdd17a56509785d25d08fad5de5785f558408cba098c42eab712a4fffd5b
|
4
|
+
data.tar.gz: d1a482064a6df6988fccb5ae72c39bf575ec5e2e50c5c2c2b652c18aa26b2f6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a797522fc38b6eed1b5b7f6a38ca7f25659fade4a16528e69ab2ebc96128e15e67c1bedcf5dec6dfff5b5e33a20862f933ad65cdf95ea5481d2dd92f0958944d
|
7
|
+
data.tar.gz: 68531c76fe1ef1a79cf58f69f9f0a4cca17c69fc00926d9efd584d161f5b19d5647958666fe79885f20f218c04cdf9aa663212b792c8c77f61369b9c37e683ba
|
data/lib/instana/secrets.rb
CHANGED
data/lib/instana/tracing/span.rb
CHANGED
@@ -80,34 +80,16 @@ module Instana
|
|
80
80
|
# @param limit [Integer] Limit the backtrace to the top <limit> frames
|
81
81
|
#
|
82
82
|
def add_stack(limit: 30, stack: Kernel.caller)
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
x = i.split(':')
|
95
|
-
|
96
|
-
sanitized_stack << {
|
97
|
-
:c => x[0],
|
98
|
-
:n => x[1],
|
99
|
-
:m => x[2]
|
100
|
-
}
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
if sanitized_stack.length > limit
|
105
|
-
# (limit * -1) gives us negative form of <limit> used for
|
106
|
-
# slicing from the end of the list. e.g. stack[-30, 30]
|
107
|
-
@data[:stack] = sanitized_stack[limit*-1, limit]
|
108
|
-
else
|
109
|
-
@data[:stack] = sanitized_stack
|
110
|
-
end
|
83
|
+
@data[:stack] = stack
|
84
|
+
.map do |call|
|
85
|
+
file, line, *method = call.split(':')
|
86
|
+
|
87
|
+
{
|
88
|
+
c: file,
|
89
|
+
n: line,
|
90
|
+
m: method.join(' ')
|
91
|
+
}
|
92
|
+
end.take(limit > 40 ? 40 : limit)
|
111
93
|
end
|
112
94
|
|
113
95
|
# Log an error into the span
|
data/lib/instana/version.rb
CHANGED
@@ -29,6 +29,24 @@ class NetHTTPTest < Minitest::Test
|
|
29
29
|
WebMock.disable_net_connect!
|
30
30
|
end
|
31
31
|
|
32
|
+
def test_get_without_query
|
33
|
+
clear_all!
|
34
|
+
WebMock.allow_net_connect!
|
35
|
+
|
36
|
+
Instana.tracer.start_or_continue_trace(:"net-http-test") do
|
37
|
+
Net::HTTP.get(URI('http://127.0.0.1:6511/'))
|
38
|
+
end
|
39
|
+
|
40
|
+
spans = ::Instana.processor.queued_spans
|
41
|
+
assert_equal 3, spans.length
|
42
|
+
|
43
|
+
http_span = find_first_span_by_name(spans, :'net-http')
|
44
|
+
assert_equal "http://127.0.0.1:6511/", http_span[:data][:http][:url]
|
45
|
+
assert_equal "200", http_span[:data][:http][:status]
|
46
|
+
|
47
|
+
WebMock.disable_net_connect!
|
48
|
+
end
|
49
|
+
|
32
50
|
def test_block_request
|
33
51
|
clear_all!
|
34
52
|
WebMock.allow_net_connect!
|
data/test/secrets_test.rb
CHANGED
@@ -88,6 +88,15 @@ class SecretsTest < Minitest::Test
|
|
88
88
|
assert_redacted @subject.remove_from_query(url, sample_config), %w(filter[instantiate]), raw_str: true
|
89
89
|
end
|
90
90
|
|
91
|
+
def test_with_nil
|
92
|
+
sample_config = {
|
93
|
+
"matcher"=>"contains",
|
94
|
+
"list"=>["stan"]
|
95
|
+
}
|
96
|
+
|
97
|
+
assert_equal @subject.remove_from_query(nil, sample_config), nil
|
98
|
+
end
|
99
|
+
|
91
100
|
private
|
92
101
|
|
93
102
|
def url_for(keys)
|
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.
|
4
|
+
version: 1.204.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: 2021-07-
|
11
|
+
date: 2021-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|