How to fix Token usage monitoring in Azure AI Foundry?

Astap Kuryan 0 Reputation points
2025-03-03T21:21:42.1966667+00:00

Hi!

After a redeploy of my .Net application which uses Azure OpenAI, I stopped seeing Token usage metrics:
User's image

I can see correct requests count and I see that token are used from changing costs, but I can not effectively monitor how much. It is happening second time to me - previous time it returned after about a week without my direct interference, but now it is gone again and I don't see how I could affect the configuration. Also it seems that switch to another region helps but it is not what I want to do.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,598 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pavankumar Purilla 8,335 Reputation points Microsoft External Staff Moderator
    2025-03-04T00:07:12.5+00:00

    Hi Astap Kuryan,
    Greetings & Welcome to the Microsoft Q&A forum! Thank you for sharing your query.
    I'm sorry to hear you're experiencing issues with monitoring token usage metrics in your Azure OpenAI integration.

    Here are some steps and considerations that might help resolve the issue:

    Ensure Diagnostic Settings Configuration is enabled for your Azure OpenAI resource and includes relevant metrics like "Processed Inference Tokens" in the logs.

    Leverage Log Analytics Integration by connecting your Azure OpenAI resource to Log Analytics. This allows you to capture detailed logs and use custom queries to track token usage.

    Implement API-Level Monitoring by capturing request and response payloads when using the API and calculating token usage locally using OpenAI’s token estimation methods.

    I hope this information helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.