lib/instana/instrumentation/sidekiq-worker.rb in instana-1.6.0 vs lib/instana/instrumentation/sidekiq-worker.rb in instana-1.6.1

- old
+ new

@@ -4,10 +4,17 @@ def call(_worker, msg, _queue) kv_payload = { :'sidekiq-worker' => {} } kv_payload[:'sidekiq-worker'][:job_id] = msg['jid'] kv_payload[:'sidekiq-worker'][:queue] = msg['queue'] kv_payload[:'sidekiq-worker'][:job] = msg['class'] - kv_payload[:'sidekiq-worker'][:retry] = msg['retry'] + kv_payload[:'sidekiq-worker'][:retry] = msg['retry'].to_s + + # Temporary until we move connection collection to redis + # instrumentation + Sidekiq.redis_pool.with do |conn| + opts = conn.client.options + kv_payload[:'sidekiq-worker'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}" + end context = {} if msg.key?('X-Instana-T') trace_id = msg.delete('X-Instana-T') span_id = msg.delete('X-Instana-S')