An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hello Darshan N,
Greetings! Thanks for raising this question in the Q&A forum.
Great questions and the good news is that Azure OpenAI has built-in monitoring through Azure Monitor, and it works on free credits too without any extra paid configuration. Let me address all four of your questions clearly.
Where to find token usage metrics in the Azure Portal
Go to Azure Portal > Your Azure OpenAI resource > Monitoring > Metrics in the left navigation pane. This opens the Azure Monitor Metrics Explorer scoped to your OpenAI resource. No additional setup is needed to start seeing metrics here they are available by default.
Which metric names to select for input, output, and total tokens
For token usage, use the following metrics:
- Processed Prompt Tokens — this is your input tokens (the tokens you send in each request)
- Generated Completion Tokens — this is your output tokens (the tokens the model generates in response)
- Processed Inference Tokens — this is the total tokens (input + output combined)
These metrics directly correspond to the prompt_tokens, completion_tokens, and total_tokens fields you see in the API response under the usage property.
To add them in Metrics Explorer, click + Add metric, search for the metric name, and set the Aggregation to Sum so you get a running total rather than an average.
How to filter metrics by a specific deployment name
Once you have a metric added, click Apply splitting and choose ModelDeploymentName as the splitting dimension. This gives you a separate time series per deployment and is the supported way to monitor each deployment individually.
You can also click Add filter, set the property to ModelDeploymentName, and select your specific deployment from the dropdown to isolate just that one deployment's data.
Here is a step-by-step summary for setting up one chart:
- Go to Azure Portal > Your Azure OpenAI resource > Monitoring > Metrics
- Click + Add metric and select Processed Prompt Tokens
- Set Aggregation to Sum
- Click Apply splitting > ModelDeploymentName to see per-deployment data
- Click + Add metric again to add Generated Completion Tokens on the same chart
- Adjust the time range at the top right (e.g., Last 24 hours, Last 7 days)
Is there a delay in metrics being updated?
Yes, there is a short delay. These metrics can be analyzed using minimum, average, and maximum aggregation over 1-minute windows, so the granularity is 1 minute but in practice you may see a 2 to 5 minute lag before a request shows up in the chart after it is made. This is normal Azure Monitor behavior and not specific to OpenAI.
Do you need any extra diagnostic settings?
No extra configuration is needed to view the basic token metrics in Metrics Explorer — they are available out of the box on free credits. However, if you want to export metrics to a Log Analytics workspace for richer querying with KQL, you can optionally set that up:
Go to Your Azure OpenAI resource > Monitoring > Diagnostic settings > + Add diagnostic setting, enable AllMetrics, and send them to a Log Analytics workspace. This allows you to query token usage with KQL like this:
AzureMetrics
| where MetricName in ("ProcessedPromptTokens", "GeneratedTokens", "TokenTransaction")
| summarize TotalTokens = sum(Total) by bin(TimeGenerated, 1d), MetricName
| order by TimeGenerated asc
| render timechart
You can also pin these charts to an Azure Dashboard for a persistent view, or click Share > Download to Excel to get the raw data for your own analysis.
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.