Skip to main content
In some cases you will want to access the current run (span) within a traced function. This can be useful for extracting UUIDs, tags, or other information from the current run. You can access the current run by calling the get_current_run_tree/getCurrentRunTree function in the Python or TypeScript SDK, respectively. For a full list of available properties on the RunTree object, see this reference.

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.