pub async fn trace_node<F, Fut, I, O>(
name: &str,
run_type: RunType,
inputs: I,
f: F,
) -> Result<O>Expand description
Helper function to trace a node execution
This function wraps a node execution with tracing:
- Creates a tracer with serialized inputs
- Posts the run to LangSmith (start_time, inputs)
- Executes the function
- Updates the run with outputs and end_time
- Handles errors appropriately