The Ruby agent can trace outgoing HTTP requests made by your application or script in order to:
- Record metrics about how long your HTTP requests are taking and which hosts they're hitting.
- Annotate transaction traces with nodes for each HTTP request.
- Provide distributed tracing for requests between applications instrumented with New Relic.
The following HTTP client libraries are currently supported by the Ruby agent:
Minimum supported version
N/A (part of the Ruby standard library)
Also includes libraries built upon Net::HTTP, such as httparty.
See Excon notes.
Hydra requests get partial instrumentation, 1.8.7 stability. See Typhoeus notes.
Instrumentation of asynchronous requests is not supported.
Curl::Multi requests get partial instrumentation. See Curb notes.
The Ruby agent supports Excon version 0.19.0 or higher. Excon instrumentation relies on the ability to add an Excon middleware to the
:middlewares key of
Excon.defaults, so if your application modifies
Excon.defaults you should ensure that you preserve the value of the
The Ruby agent supports Typhoeus version 0.5.3 or higher.
Parallel requests made via the
Hydra mechanism in Typhoeus only have partial distributed tracing support. For such requests, the Ruby agent will record a single transaction trace node representing the entire batch, but you will not be able to see the details about each individual request in the batch. Cross application tracing does not support requests made via the
Testing has shown significant issues with segfaults when running Typhoeus on MRI 1.8.7. Recommendation: Use Ruby Enterprise Edition or MRI 1.9.3 or higher to avoid these problems.
The Ruby agent supports Curb version 0.8.1 or higher. Curb instrumentation on JRuby is not supported.
Requests made via the
Curl::Multi API currently only have partial distributed tracing support (equivalent to what is offered for requests made via the Typhoeus
Hydra API). For such requests, the Ruby agent will record a single transaction trace node representing the entire batch, but you will not be able to see the details about each individual request in the batch. Requests made via the
Curl::Multi mechanism do not have cross application tracing support.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.