Skip to main content
LangWatch supports tracing Azure OpenAI API calls using the same otelopenai middleware used for OpenAI. Configure the client to point to your Azure endpoint.

Installation

Usage

Set LANGWATCH_API_KEY, AZURE_OPENAI_API_KEY, and AZURE_OPENAI_ENDPOINT environment variables before running.
Set AZURE_OPENAI_ENDPOINT to your Azure OpenAI resource endpoint URL (e.g., https://your-resource.openai.azure.com/openai/deployments/your-deployment).
The defer tp.Shutdown(ctx) call is essential. Without it, traces buffered in memory will be lost when your application exits.