• /
  • EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

HTTP client tracing in Ruby

The Ruby agent can trace outgoing HTTP requests made by your application or script 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.

Supported HTTP client libraries

The following HTTP client libraries are currently supported by the Ruby agent:

Name

Minimum supported version

Notes

Async::HTTP

0.59.0

Curb

0.9.3

Curl::Multi requests get partial instrumentation. See Curb notes.

Ethon

0.12.0

See Ethon notes.

Excon

0.56.0

See Excon notes.

HTTPClient

2.8.3

Instrumentation of asynchronous requests is not supported.

http.rb

2.2.2

HTTPX

1.0.0

Net::HTTP

N/A (part of the Ruby standard library)

Also includes libraries built upon Net::HTTP, such as httparty.

Typhoeus

1.3.0

Ethon notes

The same team that maintains Ethon and depends on Ethon for its functionality also maintains Typhoeus. To prevent duplicate reporting for each HTTP request, the agent disables Ethon instrumentation when it detects Typhoeus.

Excon notes

The Ruby agent supports Excon version 0.56.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 :middlewares key.

Curb notes

The Ruby agent supports Curb version 0.9.3 or higher. Curb instrumentation on JRuby is not supported.

Requests made via the Curl::Multi API currently only have partial distributed tracing support. The Ruby agent will record a single transaction trace node representing the entire batch, but you won't be able to see the details about individual requests in the batch.

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.