In New Relic APM, x-ray sessions give you deeper insight into a key transaction's performance by showing transaction traces alongside long-running profiler results. After you select the number of transaction traces (default is 50) and duration (default is one hour), New Relic will collect transaction traces and a thread profile for your transaction. Collection automatically stops when either the requested trace count (maximum 100) or amount of time specified (maximum one hour) has passed.
Access to this feature depends on your subscription level.
Make sure you have the latest Java release.
Make sure you have the latest Python release.
WSGI environments: If your server uses coroutines (green threads), Python users will not see any thread profiling data in the existing thread profiler or in the Thread profile tab for x-ray sessions.
Make sure you have the latest Ruby release.
Thread profiling has these restrictions with the Ruby agent:
Agent differences for thread profiling and x-ray sessions
For Python and Ruby, an x-ray session does not profile all hosts or processes; it selects one host or process and profiles it. If you have multiple worker processes, the x-ray session results will vary depending on which process is selected. For Python and Ruby, the x-ray session profiles a thread in the same way as the thread profiling tool.
The Java agent is different:
- Full thread profiling is for a single host or process.
- An x-ray session runs a thread profiler across the hosts or processes running the application (capped at 100). Then, the x-ray session captures profiler data only for the selected key transaction. The x-ray session includes both an Overview page about the transaction traces and a Thread Profile page with more detail.
- Because an x-ray session runs across more than one process, the time period between samples is automatically adjusted to avoid overloading the CPU.