openai-go/v3 client’s azure subpackage. The azureopenai module is a thin wrapper over the OpenAI instrumentation: all of OpenAI’s chat / responses / embeddings capture applies unchanged, and the provider is recorded as azure.openai.
Installation
Usage
Set
LANGWATCH_API_KEY, AZURE_OPENAI_API_KEY, and AZURE_OPENAI_ENDPOINT environment variables before running.azure connection options and wire in azureopenai.Middleware via option.WithMiddleware:
AZURE_OPENAI_ENDPOINT to your Azure OpenAI resource endpoint (e.g., https://your-resource.openai.azure.com); the Model you pass is your deployment name.
The middleware captures input and output content by default (
langwatch.DataCaptureAll). Pass azureopenai.WithDataCapture(langwatch.DataCaptureNone) to opt out.Related
- Go Integration Guide - Setup, manual spans, data capture and the REST client
- Go SDK API Reference - Instrumentation options and collected attributes
- Capturing Evaluations & Guardrails - Log evaluations and implement guardrails in your Azure OpenAI applications