lib/opentelemetry/instrumentation/pg/patches/connection.rb in opentelemetry-instrumentation-pg-0.25.3 vs lib/opentelemetry/instrumentation/pg/patches/connection.rb in opentelemetry-instrumentation-pg-0.26.0

- old
+ new

@@ -160,11 +160,11 @@ # As a fallback, we can use the hostaddr of the parsed connection # string when there is only one. Some older versions of libpq allow # multiple without any way to discern which is presently connected. addr = conninfo_hash[:hostaddr] - return addr unless addr&.include?(',') + addr unless addr&.include?(',') end def transport_attrs h = host if h&.start_with?('/') @@ -188,10 +188,10 @@ return port if defined?(::PG::DEF_PGPORT) # As a fallback, we can use the port of the parsed connection # string when there is exactly one. p = conninfo_hash[:port] - return p.to_i unless p.nil? || p.empty? || p.include?(',') + p.to_i unless p.nil? || p.empty? || p.include?(',') end end end end end