module NewRelic::Agent::Instrumentation::Curb::Easy
Attributes
Public Instance Methods
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 56 def header_str_with_tracing if self._nr_serial self._nr_header_str else # Since we didn't install a header callback for a non-serial request, # just fall back to the original implementation. yield end end
We override this method in order to ensure access to header_str even though we use an on_header callback
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 20 def http_head_with_tracing self._nr_http_verb = :HEAD yield end
We have to hook these three methods separately, as they don’t use Curl::Easy#http
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 25 def http_post_with_tracing self._nr_http_verb = :POST yield end
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 30 def http_put_with_tracing self._nr_http_verb = :PUT yield end
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 36 def http_with_tracing(verb) self._nr_http_verb = verb.to_s.upcase yield end
Hook the http method to set the verb.
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 49 def method_with_tracing(verb) self._nr_http_verb = verb.upcase yield end
Record the HTTP verb for future perform calls
Source
# File lib/new_relic/agent/instrumentation/curb/instrumentation.rb, line 42 def perform_with_tracing self._nr_http_verb ||= :GET self._nr_serial = true yield end
Hook the perform method to mark the request as non-parallel.