Traces
What are transaction traces in Scout?
Transaction traces are detailed recordings of individual web requests and background job executions. Scout automatically collects these traces across your endpoints and background jobs. Each trace shows the execution flow from the request through to line-of-code, helping you identify bottlenecks.
How do I view SQL queries in a trace?
Scout captures a sanitized version of SQL queries. In the trace view, click the “SQL” button next to any database call to view the query details. Note that query statements over 16k characters are not collected to limit agent overhead.
What are Code Backtraces?
For method calls taking 500ms or longer, Scout shows a “CODE” button. If you have GitHub integration enabled, clicking this reveals: - The specific line of code - Associated SQL or HTTP endpoint - The code author - Commit date - Deploy time
Without GitHub integration, you’ll see a standard backtrace.
What’s the difference between Summary View and Timeline View?
Scout offers two trace display modes:
Summary View: Method calls are aggregated and listed from most expensive to least expensive. The time shown is the total across all calls of that method.
Timeline View: Shows the execution order of calls as they occurred during the transaction, helping you understand the sequence of operations.
What is Trace Explorer?
Trace Explorer lets you filter and search transaction traces to answer specific questions like: - What was the slowest request yesterday? - How has the app performed for a specific user? - Which endpoints generate the most slow requests?
Access it via the “Traces” navigation link when viewing an app.
How do I use Trace Explorer?
Trace Explorer has two main areas:
Dimension Histograms (top): Shows histograms for trace dimensions including response time distribution, count by endpoints, and any custom context you’ve added. Click and drag on any chart to filter.
Trace List (bottom): Lists individual traces matching your filters. Click any trace URI to open the full transaction trace in a new tab.
What is Custom Context?
Custom Context allows you to add business metadata to your traces, such as user IDs or customer types. This data appears as additional dimensions in Trace Explorer, enabling filtering like “show me all traces for user@domain.com”. See language-specific documentation for implementation details.