Module: RequestTracer::Integration::RestClientHandler
- Extended by:
- RestClientHandler
- Includes:
- Base
- Included in:
- RestClientHandler
- Defined in:
- lib/request_tracer/integration/rest_client_handler.rb
Constant Summary
Constants included from Base
Instance Method Summary collapse
Methods included from Base
#extract_fields_from_headers, #extract_headers_from_fields
Instance Method Details
#activate ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/request_tracer/integration/rest_client_handler.rb', line 8 def activate require 'rest-client' RestClient.add_before_execution_proc do |req, params| Trace.record do |trace| extract_headers_from_fields(trace).each {|h, v| req[h] = v} end end end |