instana 1.10.7 → 1.10.8
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 +4 -4
- data/lib/instana/instrumentation/dalli.rb +8 -4
- data/lib/instana/version.rb +1 -1
- data/test/instrumentation/dalli_test.rb +36 -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: 684dee7f05eb5f97c5a798ecbcbc2f3dc64a55399111684416c9c0322f064e7a
|
4
|
+
data.tar.gz: 6112a16e4bcc2e25806472b5d92dfeaa03927af40a0a163a51d4ec8a387cef7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bc36f94b938bf57384191c673d952ad8b9a7d2ed7cefe89b07ac4d23dd5d8e0d364365f1d1021c35a1f81a85ee7588df6239c509cba41f2f6ffb3070e003a0
|
7
|
+
data.tar.gz: 31e1dc82d98ea8aee566044803c629e03a3a293b508c5a70ebd69b561d7d4cd87b0c79546767500d77a66fb61b7703b199072a20713d6fab1f4f985b9df59e64
|
@@ -20,18 +20,20 @@ module Instana
|
|
20
20
|
entry_payload[:memcache][:key] = key
|
21
21
|
|
22
22
|
::Instana.tracer.log_entry(:memcache, entry_payload)
|
23
|
+
exit_payload = { :memcache => {} }
|
24
|
+
|
23
25
|
result = perform_without_instana(*args, &blk)
|
24
26
|
|
25
|
-
kv_payload = { :memcache => {}}
|
26
27
|
if op == :get
|
27
|
-
|
28
|
+
exit_payload[:memcache][:hit] = result ? 1 : 0
|
28
29
|
end
|
29
30
|
result
|
30
31
|
rescue => e
|
32
|
+
exit_payload[:memcache][:error] = e.message rescue nil
|
31
33
|
::Instana.tracer.log_error(e)
|
32
34
|
raise
|
33
35
|
ensure
|
34
|
-
::Instana.tracer.log_exit(:memcache,
|
36
|
+
::Instana.tracer.log_exit(:memcache, exit_payload) unless do_skip
|
35
37
|
end
|
36
38
|
|
37
39
|
def get_multi_with_instana(*keys)
|
@@ -41,12 +43,14 @@ module Instana
|
|
41
43
|
entry_payload[:memcache][:keys] = keys.flatten.join(", ")
|
42
44
|
|
43
45
|
::Instana.tracer.log_entry(:memcache, entry_payload)
|
46
|
+
exit_payload = { :memcache => {} }
|
47
|
+
|
44
48
|
result = get_multi_without_instana(*keys)
|
45
49
|
|
46
|
-
exit_payload = { :memcache => {} }
|
47
50
|
exit_payload[:memcache][:hits] = result.length
|
48
51
|
result
|
49
52
|
rescue => e
|
53
|
+
exit_payload[:memcache][:error] = e.message rescue nil
|
50
54
|
::Instana.tracer.log_error(e)
|
51
55
|
raise
|
52
56
|
ensure
|
data/lib/instana/version.rb
CHANGED
@@ -250,4 +250,40 @@ class DalliTest < Minitest::Test
|
|
250
250
|
assert second_span[:data][:memcache].key?(:hits)
|
251
251
|
assert_equal 2, second_span[:data][:memcache][:hits]
|
252
252
|
end
|
253
|
+
|
254
|
+
def test_get_error_logging
|
255
|
+
clear_all!
|
256
|
+
|
257
|
+
# Invalid/broken client not connected to a server
|
258
|
+
broken_dc = Dalli::Client.new('128.0.0.100:11222', :namespace => "instana_test", :expires_in => 1)
|
259
|
+
|
260
|
+
result = nil
|
261
|
+
begin
|
262
|
+
::Instana.tracer.start_or_continue_trace(:dalli_test) do
|
263
|
+
result = broken_dc.get(:instana)
|
264
|
+
end
|
265
|
+
rescue
|
266
|
+
end
|
267
|
+
|
268
|
+
spans = ::Instana.processor.queued_spans
|
269
|
+
assert_equal 2, spans.length
|
270
|
+
|
271
|
+
first_span = spans[1]
|
272
|
+
second_span = spans[0]
|
273
|
+
|
274
|
+
validate_sdk_span(first_span, {:name => :dalli_test, :type => :entry})
|
275
|
+
|
276
|
+
assert_equal :memcache, second_span[:n]
|
277
|
+
assert_equal true, second_span.key?(:error)
|
278
|
+
assert second_span[:p] == first_span[:s]
|
279
|
+
assert first_span[:t] == first_span[:s]
|
280
|
+
assert second_span[:data].key?(:memcache)
|
281
|
+
assert second_span[:data][:memcache].key?(:command)
|
282
|
+
assert_equal :get, second_span[:data][:memcache][:command]
|
283
|
+
assert second_span[:data][:memcache].key?(:key)
|
284
|
+
assert_equal :instana, second_span[:data][:memcache][:key]
|
285
|
+
assert second_span[:data][:memcache].key?(:namespace)
|
286
|
+
assert_equal 'instana_test', second_span[:data][:memcache][:namespace]
|
287
|
+
assert second_span[:data][:memcache].key?(:error)
|
288
|
+
end
|
253
289
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Giacomo Lombardo
|
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
316
|
- !ruby/object:Gem::Version
|
317
317
|
version: '0'
|
318
318
|
requirements: []
|
319
|
-
rubygems_version: 3.0.
|
319
|
+
rubygems_version: 3.0.3
|
320
320
|
signing_key:
|
321
321
|
specification_version: 4
|
322
322
|
summary: Ruby Distributed Tracing & Metrics Sensor for Instana
|