lib/opentelemetry/instrumentation/http/patches/connection.rb in opentelemetry-instrumentation-http-0.19.3 vs lib/opentelemetry/instrumentation/http/patches/connection.rb in opentelemetry-instrumentation-http-0.19.4

- old
+ new

@@ -9,13 +9,13 @@ module HTTP module Patches # Module to prepend to HTTP::Connection for instrumentation module Connection def initialize(req, options) - attributes = OpenTelemetry::Common::HTTP::ClientContext.attributes.merge( + attributes = { 'net.peer.name' => req.uri.host, 'net.peer.port' => req.uri.port - ) + }.merge!(OpenTelemetry::Common::HTTP::ClientContext.attributes) tracer.in_span('HTTP CONNECT', attributes: attributes) do super end end