Overview
This guide shows you how to integrate Latitude Telemetry into an application that uses Azure OpenAI. Azure OpenAI uses the sameopenai SDK under the hood, so the "openai" instrumentation handles it automatically.
You’ll keep calling Azure OpenAI exactly as you do today. Telemetry simply
observes and enriches those calls.
Requirements
- A Latitude account and API key
- A Latitude project slug
- A project that uses the Azure OpenAI SDK (via the
openaipackage)
Steps
1
Install
- TypeScript
- Python
2
Initialize and use
Azure OpenAI uses the
"openai" instrumentation: the same one used for standard OpenAI.- TypeScript
- Python
Streaming
When streaming, consume the stream insidecapture() so the span covers the full operation:
- TypeScript
- Python
Seeing Your Traces
Once connected, traces appear automatically in Latitude:- Open your project in the Latitude dashboard
- Each execution shows input/output messages, model, token usage, latency, and errors