Module: OpenTelemetry::Instrumentation::HttpClient::Patches::Session

Defined in:
lib/opentelemetry/instrumentation/http_client/patches/session.rb

Overview

Module to prepend to HTTPClient::Session for instrumentation

Instance Method Summary collapse

Instance Method Details

#connectObject



13
14
15
16
17
18
19
20
21
# File 'lib/opentelemetry/instrumentation/http_client/patches/session.rb', line 13

def connect
  site = @proxy || @dest
  url = site.addr

  attributes = { 'http.url' => url }.merge!(OpenTelemetry::Common::HTTP::ClientContext.attributes)
  tracer.in_span('HTTP CONNECT', attributes: attributes) do
    super
  end
end