Installation
Quick Start
What Gets Traced
- Chat completions — input messages (user text only), output text, model, token usage (prompt/completion)
- Finish reason —
azure_openai.finish_reason(stop,length,content_filter,tool_calls) - Extended tokens —
ai.usage.cached_tokens(prompt cache hits) andai.usage.thoughts_tokens(reasoning tokens for o1/o3 models) - Errors — captured with error status, re-thrown to caller
Configuration
Flushing and Shutdown
User Identification
Tracking Signals
Factory Function (Backwards-Compatible)
Python
Already using the Vercel AI SDK with Azure? The Vercel AI SDK integration automatically traces Azure OpenAI calls when you use the AI SDK’s Azure provider. This integration is for users calling the Azure OpenAI SDK directly.