- LLM Tracing - Real-time execution tracing via Arize Phoenix or Langfuse
- Trajectory Recording - Local screenshots and UI state for debugging
Quick Reference
LLM Tracing
Droidrun supports two tracing providers for real-time monitoring of LLM calls, agent execution, and tool invocations:- Arize Phoenix (default) - Open-source observability platform
- Langfuse - LLM engineering platform with cloud and self-hosted options
Arize Phoenix Tracing
Setup
1. Install Phoenix:http://localhost:6006 and provides a web UI for viewing traces.
3. Enable tracing in Droidrun:
Via CLI:
http://localhost:6006 to see:
- LLM calls with prompts, responses, and token counts
- Agent workflow execution (Manager, Executor, CodeAct)
- Tool invocations and their results
- Execution timings and errors
Environment variable names are lowercase:
phoenix_url and phoenix_project_name.Langfuse Tracing
Langfuse provides LLM observability with features like session tracking, user analytics, and cost monitoring. Setup 1. Get Langfuse credentials:- Cloud: Sign up at cloud.langfuse.com
- Self-hosted: Deploy using Langfuse docs
- LLM calls with prompts, completions, and token usage
- Agent execution traces and nested workflows
- Session-based analytics and cost tracking
- User-level metrics (if
langfuse_user_idis set)
Trajectory Recording
Trajectory recording saves screenshots and UI state locally for offline debugging and analysis. Unlike telemetry (sent to PostHog) and tracing (sent to Phoenix), trajectories stay on your machine.Recording Levels
| Level | What’s Saved | When to Use |
|---|---|---|
none (default) | Nothing | Production use, saves disk space |
step | Screenshot + state per agent step | General debugging, recommended for most use cases |
action | Screenshot + state per atomic action | Detailed debugging, captures every tap/swipe/type |
action level generates significantly more files than step level.
Enable Recording
Via CLI:Output Location
Trajectories are saved totrajectories/ in your working directory:
- Screenshots - PNG images of the device screen at each step/action
- State files - JSON files with:
- UI accessibility tree (element hierarchy with IDs, text, bounds)
- Action executed (e.g.,
click(5),type("hello", 3)) - Agent reasoning and step number
- Device state (current app package, activity)
- Debug why the agent made specific decisions
- Replay failed executions
- Analyze UI element detection issues
- Build training datasets for agent improvement
Related Documentation
- Configuration System - Configure tracing and telemetry settings
- Events and Workflows - Build custom monitoring integrations
- CLI Usage - Command-line flags for monitoring