instana 1.195.3 → 1.195.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/instana/instrumentation/excon.rb +10 -3
- data/lib/instana/version.rb +1 -1
- data/test/instrumentation/excon_test.rb +15 -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: '0068c5ce2a6bf7c75d517562cec424a612a31d8d938fabb7651151f52b3cc5ea'
|
4
|
+
data.tar.gz: cffa225ebc37b1a19a6a20d2418af57cd6e559a3635df17b5244bc2d603eaa20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0991b7a36fe13c5e4b8ebf93647f3a933087c0f92b8e94e2a3b4a8f7c8bcc24712560f4caf550328bc5390a51f59c334483e48b8be4b78236164b2d557608625'
|
7
|
+
data.tar.gz: bd5ab3d0ba9f0d80a5b7c86068afb04f3889321fa5a154e43e97f89f577e244e481e0b2208a3fb76ae04452b26bcd32657ca2ea9cd6133230a7e53a8904fc52f
|
@@ -5,7 +5,7 @@ module Instana
|
|
5
5
|
module Instrumentation
|
6
6
|
class Excon < ::Excon::Middleware::Base
|
7
7
|
def request_call(datum)
|
8
|
-
return @stack.request_call(datum) unless
|
8
|
+
return @stack.request_call(datum) unless traceable?
|
9
9
|
|
10
10
|
payload = { :http => {} }
|
11
11
|
path, query = datum[:path].split('?', 2)
|
@@ -36,7 +36,7 @@ module Instana
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def error_call(datum)
|
39
|
-
return @stack.error_call(datum) unless
|
39
|
+
return @stack.error_call(datum) unless traceable?
|
40
40
|
|
41
41
|
if datum[:pipeline] == true
|
42
42
|
::Instana.tracer.log_async_error(datum[:error], datum[:instana_span])
|
@@ -49,7 +49,7 @@ module Instana
|
|
49
49
|
def response_call(datum)
|
50
50
|
# FIXME: Will connect exceptions call a response?
|
51
51
|
#
|
52
|
-
return @stack.response_call(datum) unless
|
52
|
+
return @stack.response_call(datum) unless traceable?
|
53
53
|
|
54
54
|
result = @stack.response_call(datum)
|
55
55
|
|
@@ -72,6 +72,13 @@ module Instana
|
|
72
72
|
end
|
73
73
|
result
|
74
74
|
end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
def traceable?
|
79
|
+
::Instana.tracer.tracing? &&
|
80
|
+
(!Instana.tracer.current_span.exit_span? || Instana.tracer.current_span.name == :excon)
|
81
|
+
end
|
75
82
|
end
|
76
83
|
end
|
77
84
|
end
|
data/lib/instana/version.rb
CHANGED
@@ -22,7 +22,7 @@ class ExconTest < Minitest::Test
|
|
22
22
|
url = "http://127.0.0.1:6511"
|
23
23
|
|
24
24
|
connection = Excon.new(url)
|
25
|
-
Instana.tracer.start_or_continue_trace('excon-test') do
|
25
|
+
Instana.tracer.start_or_continue_trace(:'excon-test') do
|
26
26
|
connection.get(:path => '/?basic_get')
|
27
27
|
end
|
28
28
|
|
@@ -147,4 +147,18 @@ class ExconTest < Minitest::Test
|
|
147
147
|
assert_equal :sdk, grandparent_span[:n]
|
148
148
|
end
|
149
149
|
end
|
150
|
+
|
151
|
+
def test_basic_get_no_tracing
|
152
|
+
clear_all!
|
153
|
+
|
154
|
+
# A slight hack but webmock chokes with pipelined requests.
|
155
|
+
# Delete their excon middleware
|
156
|
+
Excon.defaults[:middlewares].delete ::WebMock::HttpLibAdapters::ExconAdapter
|
157
|
+
Excon.defaults[:middlewares].delete ::Excon::Middleware::Mock
|
158
|
+
|
159
|
+
url = "http://127.0.0.1:6511"
|
160
|
+
|
161
|
+
connection = Excon.new(url)
|
162
|
+
connection.get(:path => '/?basic_get')
|
163
|
+
end
|
150
164
|
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.195.
|
4
|
+
version: 1.195.4
|
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-03-
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|