set_branch
Method
This is a method of the ContextTraceEmitter class in the context_events module.Set current branch context for parallel execution tracking. All subsequent events emitted from the current context (thread or asyncio task) include this branch_id until cleared. Concurrent branches each run in their own copied context, so they cannot overwrite each other’s branch.
Signature
Parameters
str
required
Identifier for the parallel branch (e.g., ‘parallel_0’, ‘loop_5’)
Source
View on GitHub
praisonaiagents/trace/context_events.py at line 694
