Direct SDK Calls
| Pattern | Guide |
|---|---|
| OpenAI chat, tool calling, structured outputs, Responses API | OpenAI traces |
| Anthropic messages, tool use, prompt caching | Anthropic traces |
Frameworks And Agents
| Pattern | Guide |
|---|---|
| LangChain agents and tools | LangChain traces |
| LangGraph state graphs | LangGraph traces |
LangSmith traceable functions | LangSmith traces |
| Pydantic AI structured agents | Pydantic AI traces |
| OpenAI Agents tools and handoffs | OpenAI Agents traces |
| Claude Agent SDK query loops | Claude Agent SDK traces |
| Claude Code CLI and SDK-style invocations | Claude Code SDK traces |
Custom Work
Use manual spans when a library cannot be patched or when you want a product operation to group multiple automatic child spans.TypeScript