Azure OpenAI
There are two ways to bring Azure OpenAI and Azure AI Foundry usage into PromptGlass. The connector reads diagnostic logs, Azure Monitor metrics and Cost Management data, and needs no changes to your apps. The gateway in API mode gives request-level attribution, DLP and budgets. Most organizations use both: the connector for complete coverage, and the gateway for the apps that need enforcement.
Connector setup
Section titled “Connector setup”- On each Azure OpenAI resource, add a diagnostic setting that sends
RequestResponseandAuditlogs plusAllMetricsto an Event Hub (streaming) or a storage account. - Create a service principal with:
Readeron the subscriptions or management groupMonitoring ReaderCost Management ReaderAzure Event Hubs Data Receiveron the Event Hub (if streaming)
- Add the connector:
promptglass connectors add azure-openai \ --tenant-id <tenant> --client-id <app> --client-secret-env AZ_SECRET \ --management-group mg-ai --eventhub-namespace acme-ai-logs --eventhub aoai-diagData collected
Section titled “Data collected”| Source | Data |
|---|---|
| Diagnostic logs | Caller IP, operation, deployment, model, status, duration, token counts, caller identity for Entra ID-authenticated calls |
| Azure Monitor metrics | ProcessedPromptTokens, GeneratedTokens, throttling, provisioned utilization |
| Cost Management | Billed cost by resource and meter, PTU reservations |
| Resource Graph | Inventory of every Azure OpenAI and AI Foundry resource and deployment |
Using Azure OpenAI as the approved destination
Section titled “Using Azure OpenAI as the approved destination”A common pattern routes risky consumer AI usage to the company’s own Azure OpenAI deployment. A policy uses action: route to send matching gateway traffic to a named Azure target:
targets: azure-openai-eu: type: azure-openai endpoint: https://acme-eu.openai.azure.com deployment: gpt-4o auth: { managedIdentity: true }See policy examples.
Provisioned throughput
Section titled “Provisioned throughput”When you use PTUs, PromptGlass shows utilization by team over time, so you can right-size reservations or move bursty workloads to pay-as-you-go deployments.