Module: AllStak::Integrations::NetHTTP

Defined in:
lib/allstak/integrations/net_http.rb

Overview

Monkey-patches Net::HTTP#request to capture outbound HTTP calls as AllStak http-request telemetry with real timing, status, and size.

No duplication: we patch at the #request level, which every Net::HTTP convenience method (get, post, post_form, etc.) funnels through.

Defined Under Namespace

Modules: Patch

Class Method Summary collapse

Class Method Details

.install!Object



11
12
13
14
15
# File 'lib/allstak/integrations/net_http.rb', line 11

def self.install!
  return if @installed
  ::Net::HTTP.prepend(Patch)
  @installed = true
end

.installed?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/allstak/integrations/net_http.rb', line 17

def self.installed?
  @installed == true
end