instana 1.195.3 → 1.195.4

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: b3c25ac47f1cf483842987544cbabbb789f6b970ac6eacf6e98aa775dcd17a30
4
- data.tar.gz: 2f5dd56ca03c8a676ab9748e261502667e6f76e01074aff5e5fc63543f12a076
3
+ metadata.gz: '0068c5ce2a6bf7c75d517562cec424a612a31d8d938fabb7651151f52b3cc5ea'
4
+ data.tar.gz: cffa225ebc37b1a19a6a20d2418af57cd6e559a3635df17b5244bc2d603eaa20
5
5
  SHA512:
6
- metadata.gz: 9d03380277adfd468ed0ed73ae646c552cdcc4675eb6e6ffc6e83beff9e17b2d18d5c08a5815115d170503b50bf86a876366ddb793e9e7fa1914e1c0559d089e
7
- data.tar.gz: 5cca053e9833421b31264fa4d9d46f5a8dea6150e47d260f711712390bb51d6bb8ada2a0abad4144f2159919b15b34b318204c44cc90870ebba32f3bb76bfdaf
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 ::Instana.tracer.tracing? && !Instana.tracer.current_span.exit_span?
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 ::Instana.tracer.tracing? || !Instana.tracer.current_span.exit_span?
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 ::Instana.tracer.tracing? || !Instana.tracer.current_span.exit_span?
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
@@ -2,6 +2,6 @@
2
2
  # (c) Copyright Instana Inc. 2016
3
3
 
4
4
  module Instana
5
- VERSION = "1.195.3"
5
+ VERSION = "1.195.4"
6
6
  VERSION_FULL = "instana-#{VERSION}"
7
7
  end
@@ -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.3
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-23 00:00:00.000000000 Z
11
+ date: 2021-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler