instana 1.7.6 → 1.7.7

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
  SHA1:
3
- metadata.gz: d45e4817a11c73f3e703e38cacb884cc2219393e
4
- data.tar.gz: 099bd8ed5eb581eb5f550c1d22c1cb3744e1fc97
3
+ metadata.gz: c3fed3e3fee894cbd36d18cc5e01c85977a8c51d
4
+ data.tar.gz: baaa2b1e834962ed98e46bebda58bf6f9f411f24
5
5
  SHA512:
6
- metadata.gz: 43ff3857a545a20eaea8295aa513abe77f3e5e15e7641235bcdcfaf146b502e28d75119f680a6c6933bf53151ed5ed3f7a5f0d9636ea46de26172bb4eaf4d733
7
- data.tar.gz: 7fba5eb8b19c8c5a3da7df4cdc25af0e57de41c375eb2fff90059649950cc3c9566c8ccb43ddb5e81b49145727031babe10438c2ad3e62686e946b3e5aff557a
6
+ metadata.gz: c46e619221c89f61ebb3da597d9c77cbfbbdbc72455fad9ee83364998c41ffcb48dc09b78d9cd97fe2934cb33bd733032f4e6b97cb4221d3492fc54b58543b7d
7
+ data.tar.gz: fd8028cd58c3dd685f80a8fdb85d17ccde28c15c3b762398c9f2187837a67d50a76ccfbf55995e5892f37c0948944a28297c39d834e3fa1d6f017cff7992f215
data/README.md CHANGED
@@ -10,6 +10,7 @@ The Instana gem provides Ruby metrics and traces (request, queue & cross-host) f
10
10
  [![Code
11
11
  Climate](https://codeclimate.com/github/instana/ruby-sensor/badges/gpa.svg)](https://codeclimate.com/github/instana/ruby-sensor)
12
12
  [![Gem Version](https://badge.fury.io/rb/instana.svg)](https://badge.fury.io/rb/instana)
13
+ [![OpenTracing Badge](https://img.shields.io/badge/OpenTracing-enabled-blue.svg)](http://opentracing.io)
13
14
 
14
15
  ## Note
15
16
 
@@ -45,7 +45,7 @@ end
45
45
  if defined?(GRPC::RpcDesc) && ::Instana.config[:grpc][:enabled]
46
46
  call_types.each do |call_type|
47
47
  GRPC::RpcDesc.class_eval <<-RUBY, __FILE__, __LINE__ + 1
48
- def handle_#{call_type}_with_instana(active_call, mth)
48
+ def handle_#{call_type}_with_instana(active_call, mth, *others)
49
49
  kvs = { rpc: {} }
50
50
  metadata = active_call.metadata
51
51
 
@@ -66,7 +66,7 @@ if defined?(GRPC::RpcDesc) && ::Instana.config[:grpc][:enabled]
66
66
  :'rpc-server', kvs, incoming_context
67
67
  )
68
68
 
69
- handle_#{call_type}_without_instana(active_call, mth)
69
+ handle_#{call_type}_without_instana(active_call, mth, *others)
70
70
  rescue => e
71
71
  kvs[:rpc][:error] = true
72
72
  ::Instana.tracer.log_info(kvs)
@@ -10,8 +10,8 @@ module Instana
10
10
 
11
11
  # Temporary until we move connection collection to redis
12
12
  # instrumentation
13
- Sidekiq.redis_pool.with do |conn|
14
- opts = conn.client.options
13
+ Sidekiq.redis_pool.with do |client|
14
+ opts = client.respond_to?(:connection) ? client.connection : client.client.options
15
15
  kv_payload[:'sidekiq-client'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}"
16
16
  end
17
17
 
@@ -10,8 +10,8 @@ module Instana
10
10
 
11
11
  # Temporary until we move connection collection to redis
12
12
  # instrumentation
13
- Sidekiq.redis_pool.with do |conn|
14
- opts = conn.client.options
13
+ Sidekiq.redis_pool.with do |client|
14
+ opts = client.respond_to?(:connection) ? client.connection : client.client.options
15
15
  kv_payload[:'sidekiq-worker'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}"
16
16
  end
17
17
 
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.7.6"
2
+ VERSION = "1.7.7"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -17,20 +17,14 @@ class RedisTest < Minitest::Test
17
17
  clear_all!
18
18
  redis_client = create_redis_client
19
19
 
20
- redis_client.client.instance_eval do
21
- def read
22
- raise 'Something went wrong'
23
- end
24
- end
25
-
26
20
  Instana.tracer.start_or_continue_trace(:redis_test) do
27
21
  begin
28
- redis_client.set('hello', 'world')
22
+ redis_client.zadd('hello', 'invalid', 'value')
29
23
  rescue; end
30
24
  end
31
25
  redis_client.disconnect!
32
26
 
33
- assert_redis_trace('SET', with_error: 'Something went wrong')
27
+ assert_redis_trace('ZADD', with_error: 'ERR value is not a valid float')
34
28
  end
35
29
 
36
30
  def test_pipeline_call
@@ -39,7 +33,8 @@ class RedisTest < Minitest::Test
39
33
 
40
34
  Instana.tracer.start_or_continue_trace(:redis_test) do
41
35
  redis_client.pipelined do
42
- exec_sample_pipeline_calls(redis_client)
36
+ redis_client.set('hello', 'world')
37
+ redis_client.set('other', 'world')
43
38
  end
44
39
  end
45
40
 
@@ -50,21 +45,16 @@ class RedisTest < Minitest::Test
50
45
  clear_all!
51
46
  redis_client = create_redis_client
52
47
 
53
- redis_client.client.instance_eval do
54
- def read
55
- raise 'Something went wrong'
56
- end
57
- end
58
-
59
48
  Instana.tracer.start_or_continue_trace(:redis_test) do
60
49
  begin
61
50
  redis_client.pipelined do
62
- exec_sample_pipeline_calls(redis_client)
51
+ redis_client.set('other', 'world')
52
+ redis_client.call('invalid')
63
53
  end
64
54
  rescue; end
65
55
  end
66
56
 
67
- assert_redis_trace('PIPELINE', with_error: 'Something went wrong')
57
+ assert_redis_trace('PIPELINE', with_error: "ERR unknown command 'invalid'")
68
58
  end
69
59
 
70
60
  def test_multi_call
@@ -73,7 +63,8 @@ class RedisTest < Minitest::Test
73
63
 
74
64
  Instana.tracer.start_or_continue_trace(:redis_test) do
75
65
  redis_client.multi do
76
- exec_sample_pipeline_calls(redis_client)
66
+ redis_client.set('hello', 'world')
67
+ redis_client.set('other', 'world')
77
68
  end
78
69
  end
79
70
 
@@ -84,21 +75,16 @@ class RedisTest < Minitest::Test
84
75
  clear_all!
85
76
  redis_client = create_redis_client
86
77
 
87
- redis_client.client.instance_eval do
88
- def read
89
- raise 'Something went wrong'
90
- end
91
- end
92
-
93
78
  Instana.tracer.start_or_continue_trace(:redis_test) do
94
79
  begin
95
80
  redis_client.multi do
96
- exec_sample_pipeline_calls(redis_client)
81
+ redis_client.set('other', 'world')
82
+ redis_client.call('invalid')
97
83
  end
98
84
  rescue; end
99
85
  end
100
86
 
101
- assert_redis_trace('MULTI', with_error: 'Something went wrong')
87
+ assert_redis_trace('MULTI', with_error: "ERR unknown command 'invalid'")
102
88
  end
103
89
 
104
90
  private
@@ -107,12 +93,6 @@ class RedisTest < Minitest::Test
107
93
  Redis.new(url: ENV['I_REDIS_URL'])
108
94
  end
109
95
 
110
- def exec_sample_pipeline_calls(redis_client)
111
- redis_client.set('hello', 'world')
112
- redis_client.set('other', 'world')
113
- redis_client.hmset('awesome', 'wonderful', 'world')
114
- end
115
-
116
96
  def assert_redis_trace(command, with_error: nil)
117
97
  assert_equal 1, ::Instana.processor.queue_count
118
98
  trace = ::Instana.processor.queued_traces.first
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.7.6
4
+ version: 1.7.7
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: 2017-09-28 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -309,51 +309,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  version: '0'
310
310
  requirements: []
311
311
  rubyforge_project:
312
- rubygems_version: 2.6.13
312
+ rubygems_version: 2.6.11
313
313
  signing_key:
314
314
  specification_version: 4
315
315
  summary: Ruby sensor for Instana
316
316
  test_files:
317
+ - test/agent/agent_test.rb
318
+ - test/apps/cuba.rb
319
+ - test/apps/grpc_server.rb
317
320
  - test/apps/roda.rb
318
321
  - test/apps/sinatra.rb
319
- - test/apps/grpc_server.rb
320
- - test/apps/cuba.rb
321
- - test/config_test.rb
322
- - test/agent/agent_test.rb
323
- - test/servers/sidekiq/worker.rb
324
- - test/servers/rackapp_6511.rb
325
- - test/servers/rails_3205.rb
326
- - test/servers/grpc_50051.rb
327
- - test/servers/helpers/sidekiq_worker_initializer.rb
328
- - test/instrumentation/excon_test.rb
329
- - test/instrumentation/net-http_test.rb
330
- - test/instrumentation/dalli_test.rb
331
- - test/instrumentation/sidekiq-client_test.rb
332
- - test/instrumentation/redis_test.rb
333
- - test/instrumentation/grpc_test.rb
334
- - test/instrumentation/sidekiq-worker_test.rb
335
- - test/instrumentation/rest-client_test.rb
336
- - test/test_helper.rb
337
- - test/models/block.rb
338
322
  - test/benchmarks/bench_id_generation.rb
339
323
  - test/benchmarks/bench_opentracing.rb
340
- - test/frameworks/rails/activerecord4_test.rb
341
- - test/frameworks/rails/actionview5_test.rb
342
- - test/frameworks/rails/activerecord5_test.rb
324
+ - test/config_test.rb
325
+ - test/frameworks/cuba_test.rb
326
+ - test/frameworks/rack_test.rb
327
+ - test/frameworks/rails/actioncontroller_test.rb
343
328
  - test/frameworks/rails/actionview3_test.rb
344
329
  - test/frameworks/rails/actionview4_test.rb
345
- - test/frameworks/rails/actioncontroller_test.rb
330
+ - test/frameworks/rails/actionview5_test.rb
346
331
  - test/frameworks/rails/activerecord3_test.rb
347
- - test/frameworks/rack_test.rb
348
- - test/frameworks/sinatra_test.rb
332
+ - test/frameworks/rails/activerecord4_test.rb
333
+ - test/frameworks/rails/activerecord5_test.rb
349
334
  - test/frameworks/roda_test.rb
350
- - test/frameworks/cuba_test.rb
335
+ - test/frameworks/sinatra_test.rb
351
336
  - test/instana_test.rb
352
- - test/tracing/opentracing_test.rb
337
+ - test/instrumentation/dalli_test.rb
338
+ - test/instrumentation/excon_test.rb
339
+ - test/instrumentation/grpc_test.rb
340
+ - test/instrumentation/net-http_test.rb
341
+ - test/instrumentation/redis_test.rb
342
+ - test/instrumentation/rest-client_test.rb
343
+ - test/instrumentation/sidekiq-client_test.rb
344
+ - test/instrumentation/sidekiq-worker_test.rb
345
+ - test/jobs/sidekiq_job_1.rb
346
+ - test/jobs/sidekiq_job_2.rb
347
+ - test/models/block.rb
348
+ - test/servers/grpc_50051.rb
349
+ - test/servers/helpers/sidekiq_worker_initializer.rb
350
+ - test/servers/rackapp_6511.rb
351
+ - test/servers/rails_3205.rb
352
+ - test/servers/sidekiq/worker.rb
353
+ - test/test_helper.rb
353
354
  - test/tracing/custom_test.rb
354
- - test/tracing/tracer_async_test.rb
355
+ - test/tracing/id_management_test.rb
356
+ - test/tracing/opentracing_test.rb
355
357
  - test/tracing/trace_test.rb
358
+ - test/tracing/tracer_async_test.rb
356
359
  - test/tracing/tracer_test.rb
357
- - test/tracing/id_management_test.rb
358
- - test/jobs/sidekiq_job_2.rb
359
- - test/jobs/sidekiq_job_1.rb