If you use a non-standard middleware framework, follow these procedures to install and configure New Relic's cross application tracing feature. If you have problems, follow the troubleshooting procedures for cross application tracing.
New Relic also supports distributed tracing. Distributed tracing improves on cross application tracing and is recommended for large, distributed systems.
Follow these requirements to use cross application tracing with the Ruby agent:
- Make sure the requests being instrumented use a supported HTTP client library.
- Install or update to the latest Ruby agent (version 18.104.22.168 or higher).
- Follow the requirements for middleware installation.
Cross application tracing works with Rack, and therefore requires Rails 2.3 or greater, or another compatible framework.
- If you use Rails, the Ruby agent will install the middleware automatically.
- If you use a different Rack-based framework, manually add the
NewRelic::Rack::AgentHooksmiddleware to your stack.
Cross application tracing can be controlled by a configuration flag.
The default for
true, even when unspecified. To disable cross application tracing, you must set this flag to
The external measurement (from the calling application) will always be larger than the internal measurement (from the called application). The external measurement is collected by New Relic's instrumentation of the HTTP client library (such as Net::HTTP). The internal measurement is taken by New Relic's instrumentation of the web framework (such as Rails) in the called application.
Here are some of the major components included in the external measurement that are not included in the internal measurement:
Some of these components are easier to control than others. For example, to capture timings for the Receiving host items above, make sure you have request queue monitoring set up on the receiving application.
New Relic also offers distributed tracing. Distributed tracing is an improvement on cross application tracing and is recommended for large, distributed systems.
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.