Module: TraceView::Inst::CurlMultiCM
- Defined in:
- lib/traceview/inst/curb.rb
Overview
CurlMultiCM
This module contains the class method wrappers for the CurlMulti class. This module should be extended by CurlMulti.
Class Method Summary collapse
Instance Method Summary collapse
-
#http_with_traceview(urls_with_config, multi_options = {}, &block) ⇒ Object
http_with_traceview.
Class Method Details
.extended(klass) ⇒ Object
204 205 206 |
# File 'lib/traceview/inst/curb.rb', line 204 def self.extended(klass) ::TraceView::Util.class_method_alias(klass, :http, ::Curl::Multi) end |
Instance Method Details
#http_with_traceview(urls_with_config, multi_options = {}, &block) ⇒ Object
http_with_traceview
::Curl::Multi.new.http wrapper
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/traceview/inst/curb.rb', line 213 def http_with_traceview(urls_with_config, ={}, &block) # If we're not tracing, just do a fast return. if !TraceView.tracing? return http_without_traceview(urls_with_config, , &block) end begin kvs = {} kvs[:Backtrace] = TraceView::API.backtrace if TraceView::Config[:curb][:collect_backtraces] TraceView::API.log_entry(:curb_multi, kvs) # The core curb call http_without_traceview(urls_with_config, , &block) rescue => e TraceView::API.log_exception(:curb_multi, e) raise e ensure TraceView::API.log_exit(:curb_multi) end end |