newrelic/rpm — pull request #124 by mislav (2013-07-09 13:11:56+00:00)
Title: Make HTTP client instrumentation aware of the "Host" request header

Instruct the HTTP client instrumentation to try to read the hostname for the request first from the "Host" header in the request, and fall back to regular connection hostname as before.

This fixes metric names in case when a HTTP connection was opened against an IP address, but the request was made with a "Host" header. Instead of this being recorded:

External/127.0.0.1/Net::HTTP/GET

NewRelic will now record this:

External/localhost/Net::HTTP/GET