instana 1.10.7-java → 1.10.8-java

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9ae0af0a3e6a372b7fe53e21eb34613994be152ec5941fe9192e238fc83ca92
4
- data.tar.gz: 405cea0367043d3389a7de25c0637801fb6376a42f45d043b22852982ae66809
3
+ metadata.gz: 8bace4b861697b0193cc8dff1fad928ab75e27f68933192c6270dc7d07887f7c
4
+ data.tar.gz: 8e7cb89f0e1ba9cb11eb57564578d996b01323549928debe639c548a5917a455
5
5
  SHA512:
6
- metadata.gz: 9e699fb09a39844e295787394efe28479d9d1979540a91072bb8e747fd1c424303e15ce3eeec001cf69cfc39ded6d6a488683cf0605be253219309f8fc8435c7
7
- data.tar.gz: a59016b9739d46366c1960f49b4fb197e2e593a34af898ddf82fc088c47fa3d780fd4ccdd80992fda8b78565245ca9690d03cf36c4b5ded187abf520b5f3e110
6
+ metadata.gz: 0c95d0e8a34f10ee3daac3f7cb658ce3409fe34f98683350493a12aacc03abf983c718e389bfc9aaca1ac74f98272251675ab6a2581acb7d142a60f619606860
7
+ data.tar.gz: 3c52fc61d3d8b1d2616b3cb1e6ff29b99c00fbc7a2ead65144de12c60de50920abd19e2b429718f766c1b978619945bcae1a89e78e650a8aa48c93e6aeecdc96
@@ -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
- kv_payload[:memcache][:hit] = result ? 1 : 0
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, kv_payload) unless do_skip
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
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.10.7"
2
+ VERSION = "1.10.8"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -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.7
4
+ version: 1.10.8
5
5
  platform: java
6
6
  authors:
7
7
  - Peter Giacomo Lombardo