wrapAgent.
Required
Create steps withtracer.startActiveSpan inside your wrapped run:
Optional step data
Add standardized attributes to support cost and quality analysis:Mark a step as failed
Record the error on the step span before ending it:Dashboard outcome
Each step appears nested under the run so you can inspect:- per-call latency
- model and token usage
- finish reason
- where failures occurred in the reasoning chain
Next Steps
- Tool call usage
- Advanced for streaming and multi-destination patterns

