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

- old
+ new

@@ -3,11 +3,18 @@ class SidekiqClient def call(worker_class, msg, queue, _redis_pool) kv_payload = { :'sidekiq-client' => {} } kv_payload[:'sidekiq-client'][:queue] = queue kv_payload[:'sidekiq-client'][:job] = worker_class - kv_payload[:'sidekiq-client'][:retry] = msg['retry'] + kv_payload[:'sidekiq-client'][:retry] = msg['retry'].to_s ::Instana.tracer.log_entry(:'sidekiq-client', kv_payload) + + # Temporary until we move connection collection to redis + # instrumentation + Sidekiq.redis_pool.with do |conn| + opts = conn.client.options + kv_payload[:'sidekiq-client'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}" + end context = ::Instana.tracer.context if context msg['X-Instana-T'] = context.trace_id_header msg['X-Instana-S'] = context.span_id_header