Learn how to instrument Azure OpenAI API calls in Go using the LangWatch SDK.
otelopenai
middleware you use for OpenAI. The setup requires pointing the client to your specific Azure resource endpoint and using your Azure API key.
https://my-langwatch-demo.openai.azure.com
).gpt-4o-mini-deployment
).openai.Client
, you must construct the correct base URL by combining your Azure endpoint and deployment name. You should also set the gen_ai.system
attribute to "azure"
for proper categorization in LangWatch.
Model
parameter in your Chat.Completions.New
call should typically be your deployment name, not the underlying model name (e.g., gpt-4o-mini
).