Show braintrust traces on exceptions - #1048
Conversation
WalkthroughMove trace-URL printing from the success path into a finally block in interactive mode so the tracer is queried and the trace URL (if any) is printed regardless of success or exception. No public API or signature changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as Interactive CLI
participant Engine
participant Tracer
User->>CLI: Enter command
CLI->>Engine: Execute
alt Engine returns result
Engine-->>CLI: Result
CLI-->>User: Output result
else Engine raises exception
Engine-->>CLI: Exception
CLI-->>User: Error message
end
Note right of CLI: finally block executes (both success & error)
CLI->>Tracer: get_trace_url()
Tracer-->>CLI: trace URL (optional)
opt Trace available
CLI-->>User: "View trace: <url>"
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)holmes/interactive.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@mainred do you mean re-reviewing please? |
When testing deepseek with SambaNova, I ran into an issue where SambaNova was returning errors. I wanted to troubleshoot it with
--trace=braintrust, but couldn't do so because traces are not shown on exceptions from the LLM. This PR fixes that.