lib/opentelemetry/instrumentation/redis/patches/client.rb in opentelemetry-instrumentation-redis-0.15.0 vs lib/opentelemetry/instrumentation/redis/patches/client.rb in opentelemetry-instrumentation-redis-0.16.0
- old
+ new
@@ -48,14 +48,13 @@
host = options[:host]
port = options[:port]
attributes = {
'db.system' => 'redis',
- 'db.instance' => options[:db].to_s,
- 'db.url' => "redis://#{host}:#{port}",
'net.peer.name' => host,
'net.peer.port' => port
}
+ attributes['db.redis.database_index'] = options[:db] unless options[:db].zero?
attributes['peer.service'] = config[:peer_service] if config[:peer_service]
attributes.merge(OpenTelemetry::Instrumentation::Redis.attributes)
end
def tracer