get_app_trace
Retrieve detailed application performance traces with all spans to analyze and resolve issues like N+1 queries, slow endpoints, and memory bloat in Rails, Django, Laravel, and other frameworks.
Instructions
Get an individual trace with all spans.
Args:
app_id (int): The ID of the Scout APM application.
trace_id (int): The ID of the trace to retrieve.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ||
| trace_id | Yes |
Implementation Reference
- scout_mcp/server.py:288-302 (handler)The main handler function for the MCP tool 'get_app_trace'. It is registered via the @mcp.tool decorator and fetches a specific trace by app_id and trace_id from the Scout APM API client.@mcp.tool(name="get_app_trace") async def get_app_trace(app_id: int, trace_id: int) -> dict[str, Any]: """ Get an individual trace with all spans. Args: app_id (int): The ID of the Scout APM application. trace_id (int): The ID of the trace to retrieve. """ try: async with api_client as scout_client: trace = await scout_client.get_trace(app_id, trace_id) return trace except scout_api.ScoutAPMError as e: return {"error": str(e)}
- scout_mcp/server.py:288-288 (registration)The @mcp.tool decorator registers the 'get_app_trace' tool with the MCP server.@mcp.tool(name="get_app_trace")