get_exception_details
Retrieve detailed exception information from Langfuse traces or spans to debug LLM application errors. Specify output format for summarized or complete data.
Instructions
Get detailed exception info for a trace/span.
Args:
ctx: Context object containing lifespan context with Langfuse client
trace_id: The ID of the trace to analyze for exceptions (unique identifier string)
span_id: Optional span ID to filter by specific span (unique identifier string)
output_mode: Controls the output format and detail level
Returns:
Based on output_mode:
- compact: List of summarized exception details
- full_json_string: String containing the full JSON response
- full_json_file: List of summarized exception details with file save info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | Yes | The ID of the trace to analyze for exceptions (unique identifier string) | |
| span_id | No | Optional span ID to filter by specific span (unique identifier string) | |
| output_mode | No | Controls the output format and action. 'compact' (default): Returns a summarized JSON object optimized for direct agent consumption. 'full_json_string': Returns the complete, raw JSON data serialized as a string. 'full_json_file': Returns a summarized JSON object AND saves the complete data to a file. | compact |