lib/opentelemetry/instrumentation/http/patches/client.rb in opentelemetry-instrumentation-http-0.19.2 vs lib/opentelemetry/instrumentation/http/patches/client.rb in opentelemetry-instrumentation-http-0.19.3
- old
+ new
@@ -17,11 +17,11 @@
attributes = {
'http.method' => request_method,
'http.scheme' => uri.scheme,
'http.target' => uri.path,
'http.url' => "#{uri.scheme}://#{uri.host}",
- 'peer.hostname' => uri.host,
- 'peer.port' => uri.port
+ 'net.peer.name' => uri.host,
+ 'net.peer.port' => uri.port
}.merge(OpenTelemetry::Common::HTTP::ClientContext.attributes)
tracer.in_span("HTTP #{request_method}", attributes: attributes, kind: :client) do |span|
OpenTelemetry.propagation.inject(req.headers)
super.tap do |response|