Module: Chronos::Integrations::NetHttp::InstrumentedRequest
- Defined in:
- lib/chronos/integrations/net_http.rb
Overview
Request wrapper prepended only to an explicitly selected HTTP object.
Instance Method Summary collapse
Instance Method Details
#request(request, body = nil, &block) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/chronos/integrations/net_http.rb', line 85 def request(request, body = nil, &block) = instance_variable_get(NetHttp::OPTIONS_KEY) started_at = [:clock].call inject_trace_headers(request, ) if [:trace_headers] response = super(request, body, &block) record_external_http(, request, started_at, response, nil) response rescue StandardError => error record_external_http(, request, started_at, nil, error) if && started_at raise end |