lib/instana/instrumentation/sidekiq-worker.rb in instana-1.7.6 vs lib/instana/instrumentation/sidekiq-worker.rb in instana-1.7.7
- old
+ new
@@ -8,11 +8,11 @@
kv_payload[:'sidekiq-worker'][:job] = msg['class']
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
+ Sidekiq.redis_pool.with do |client|
+ opts = client.respond_to?(:connection) ? client.connection : client.client.options
kv_payload[:'sidekiq-worker'][:'redis-url'] = "#{opts[:host]}:#{opts[:port]}"
end
context = {}
if msg.key?('X-Instana-T')