Skip to main content
This page collects the most common tracing patterns in one place. Use the integration-specific pages when you want the full setup notes for a provider or framework.

Direct SDK Calls

PatternGuide
OpenAI chat, tool calling, structured outputs, Responses APIOpenAI traces
Anthropic messages, tool use, prompt cachingAnthropic traces

Frameworks And Agents

PatternGuide
LangChain agents and toolsLangChain traces
LangGraph state graphsLangGraph traces
LangSmith traceable functionsLangSmith traces
Pydantic AI structured agentsPydantic AI traces
OpenAI Agents tools and handoffsOpenAI Agents traces
Claude Agent SDK query loopsClaude Agent SDK traces
Claude Code CLI and SDK-style invocationsClaude 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
await agentSpan(
  tracing.tracer,
  { name: "SupportAgent", system: "openai" },
  async (span) => {
    span.setInput(userMessage);
    const result = await runAgent(userMessage);
    span.setOutput(result.answer);
  },
);
  1. Traces Quickstart
  2. OpenAI traces or Anthropic traces
  3. Manual spans
  4. Troubleshooting