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

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

Overview

Module to prepend to HTTPClient::Session for instrumentation

Instance Method Summary collapse

Instance Method Details

#connectObject



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

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

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