- If there is no parent trace, then it is a new logger instance and you can start and flush the trace.
- If there is a parent trace, then it is an existing logger created from the experiment, and you can create the callback setting parameters to not start or flush the trace.
This behavior is also useful if you are logging to an existing logger, such as when you want the LangGraph agent to only be a part of a larger trace.
Troubleshooting
Here are some standard troubleshooting steps:- If you get the following error:
Error occurred during execution: start_trace: You must conclude the existing trace before adding a new one., you need to ensure thestart_new_traceparameter is set toFalse(Python), orstartNewTraceis set tofalse(TypeScript). - If you get the following error:
Error occurred during execution: _conclude: No existing workflow to conclude, you need to ensureflush_on_chain_endis set toFalse(Python), orflushOnChainEndis set tofalse(TypeScript).