instana 1.6.0 → 1.6.1

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
  SHA1:
3
- metadata.gz: 8d5a3d47c55fdc82fdf62db42d36c098cf4e5855
4
- data.tar.gz: 8630f17d5794a9f5786fd53e817b1efbcee0ba1d
3
+ metadata.gz: 57d7f31071d4fb159569882fbaa519377d25cfd4
4
+ data.tar.gz: 1fc724b9dc0012bea356c5a700207a8f9d893788
5
5
  SHA512:
6
- metadata.gz: 4f50211eafb3e77d5a50aa33f81330e5d1d92116e2bb203ad95928ea46a0746ee1a5826052b21d97db1e81199f9686407589f3a0d05c8de58a7e4f021aad572b
7
- data.tar.gz: 8cd886516b92ab60f13746816da3b928a69de26bd2d4779436f1423b0db0693c652cc8b46c90c8439e87e98b06511a6d6fbe2076ccaf6002db3c9f3d7831b9cd
6
+ metadata.gz: 644587f6ca8c5b735d0dc64dae7729bf066e7545d3545e04721243cf52bdbc751eb470017187b3bae6cd398a186529ee50d45975c1f18f4e9d76a83316c77e62
7
+ data.tar.gz: 55fd9be828d6ee2ed0ed9a905e1b910f56e78f9cb8f2b60e6dc67180d4353397e2c9c3ca67a619b4160d2dea9929e3ef6b06d37b8c828895b589b51581179e4c
@@ -2,9 +2,9 @@
2
2
  (function(i,s,o,g,r,a,m){i['InstanaEumObject']=r;i[r]=i[r]||function(){
3
3
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
4
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
- })(window,document,'script','//internal-eum.instana.io/eum.min.js','ineum');
5
+ })(window,document,'script','//eum-test-fullstack-0-us-west-2.instana.io/eum.min.js','ineum');
6
6
 
7
- ineum('reportingUrl', '//internal-eum.instana.io');
7
+ ineum('reportingUrl', '//eum-test-fullstack-0-us-west-2.instana.io');
8
8
  ineum('apiKey', '<%=::Instana.config[:eum_api_key]%>');
9
9
  ineum('traceId', '<%=::Instana.tracer.trace_id_header%>');
10
10
 
@@ -5,9 +5,16 @@ module Instana
5
5
  kv_payload = { :'sidekiq-client' => {} }
6
6
  kv_payload[:'sidekiq-client'][:queue] = queue
7
7
  kv_payload[:'sidekiq-client'][:job] = worker_class
8
- kv_payload[:'sidekiq-client'][:retry] = msg['retry']
8
+ kv_payload[:'sidekiq-client'][:retry] = msg['retry'].to_s
9
9
  ::Instana.tracer.log_entry(:'sidekiq-client', kv_payload)
10
10
 
11
+ # Temporary until we move connection collection to redis
12
+ # instrumentation
13
+ Sidekiq.redis_pool.with do |conn|
14
+ opts = conn.client.options
15
+ kv_payload[:'sidekiq-client'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}"
16
+ end
17
+
11
18
  context = ::Instana.tracer.context
12
19
  if context
13
20
  msg['X-Instana-T'] = context.trace_id_header
@@ -6,7 +6,14 @@ module Instana
6
6
  kv_payload[:'sidekiq-worker'][:job_id] = msg['jid']
7
7
  kv_payload[:'sidekiq-worker'][:queue] = msg['queue']
8
8
  kv_payload[:'sidekiq-worker'][:job] = msg['class']
9
- kv_payload[:'sidekiq-worker'][:retry] = msg['retry']
9
+ kv_payload[:'sidekiq-worker'][:retry] = msg['retry'].to_s
10
+
11
+ # Temporary until we move connection collection to redis
12
+ # instrumentation
13
+ Sidekiq.redis_pool.with do |conn|
14
+ opts = conn.client.options
15
+ kv_payload[:'sidekiq-worker'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}"
16
+ end
10
17
 
11
18
  context = {}
12
19
  if msg.key?('X-Instana-T')
@@ -1,4 +1,4 @@
1
1
  module Instana
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  VERSION_FULL = "instana-#{VERSION}"
4
4
  end
@@ -78,7 +78,7 @@ class SidekiqClientTest < Minitest::Test
78
78
  assert_equal :'sidekiq-client', second_span[:n]
79
79
  assert_equal 'some_random_queue', second_span[:data][:'sidekiq-client'][:queue]
80
80
  assert_equal 'SidekiqJobOne', second_span[:data][:'sidekiq-client'][:job]
81
- assert_equal false, second_span[:data][:'sidekiq-client'][:retry]
81
+ assert_equal "false", second_span[:data][:'sidekiq-client'][:retry]
82
82
  assert_equal job['jid'], second_span[:data][:'sidekiq-client'][:job_id]
83
83
  end
84
84
 
@@ -102,7 +102,7 @@ class SidekiqClientTest < Minitest::Test
102
102
 
103
103
  assert_equal 'some_random_queue', second_span[:data][:'sidekiq-client'][:queue]
104
104
  assert_equal 'SidekiqJobTwo', second_span[:data][:'sidekiq-client'][:job]
105
- assert_equal false, second_span[:data][:'sidekiq-client'][:retry]
105
+ assert_equal "false", second_span[:data][:'sidekiq-client'][:retry]
106
106
  assert_equal 'Fail to enqueue job', second_span[:data][:log][:message]
107
107
  end
108
108
 
@@ -0,0 +1,27 @@
1
+ # This is a helper initializer to boot a local instrumented Sidekiq stack
2
+ # for development and testing.
3
+ #
4
+ # export BUNDLE_GEMFILE=/path/to/ruby-sensor/gemfiles/libraries.gemfile
5
+ # bundle install
6
+ # bundle exec sidekiq -c 2 -q important -r ./test/servers/helpers/sidekiq_worker_initializer.rb
7
+ #
8
+ # In another shell, you can boot a console to queue jobs:
9
+ #
10
+ # export BUNDLE_GEMFILE=/path/to/ruby-sensor/gemfiles/libraries.gemfile
11
+ # bundle install
12
+ # bundle exec rake console
13
+ # > require Dir.pwd + '/test/jobs/sidekiq_job_1.rb'
14
+ # > Instana.tracer.start_or_continue_trace(:sidekiq_demo) do
15
+ # > ::Sidekiq::Client.push( 'queue' => 'important', 'class' => ::SidekiqJobOne,
16
+ # > 'args' => [1, 2, 3], 'retry' => false)
17
+ # > end
18
+ #
19
+
20
+ # Load test jobs.
21
+ require Dir.pwd + '/test/jobs/sidekiq_job_1.rb'
22
+ require Dir.pwd + '/test/jobs/sidekiq_job_2.rb'
23
+
24
+ require "sidekiq"
25
+ require "instana"
26
+ ::Instana.logger.info "Booting instrumented sidekiq worker for tests."
27
+ ::Sidekiq.logger.level = ::Logger::DEBUG
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.6.0
4
+ version: 1.6.1
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-07-31 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -252,6 +252,7 @@ files:
252
252
  - test/jobs/sidekiq_job_2.rb
253
253
  - test/models/block.rb
254
254
  - test/servers/grpc_50051.rb
255
+ - test/servers/helpers/sidekiq_worker_initializer.rb
255
256
  - test/servers/rackapp_6511.rb
256
257
  - test/servers/rails_3205.rb
257
258
  - test/servers/sidekiq/worker.rb
@@ -315,6 +316,7 @@ test_files:
315
316
  - test/jobs/sidekiq_job_2.rb
316
317
  - test/models/block.rb
317
318
  - test/servers/grpc_50051.rb
319
+ - test/servers/helpers/sidekiq_worker_initializer.rb
318
320
  - test/servers/rackapp_6511.rb
319
321
  - test/servers/rails_3205.rb
320
322
  - test/servers/sidekiq/worker.rb