Skip to content

Commit

Permalink
print Net::HTTP class definition and start method location
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed May 16, 2024
1 parent c7ca0dd commit c7afcbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/datadog/ci/transport/net_shim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ def open(&block)
# DEV Initializing +Net::HTTP+ directly help us avoid expensive
# options processing done in +Net::HTTP.start+:
# https://github.com/ruby/ruby/blob/b2d96abb42abbe2e01f010ffc9ac51f0f9a50002/lib/net/http.rb#L614-L618
Datadog.logger.debug("Net::HTTP class: #{::Net::HTTP}")
req = ::Net::HTTP.new(hostname, port, nil)

req.use_ssl = ssl
req.open_timeout = req.read_timeout = timeout

Datadog.logger.debug("Net::HTTP#start method location: #{req.method(:start).source_location}")
req.start(&block)
end

Expand Down

0 comments on commit c7afcbd

Please sign in to comment.