> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-mintlify-add-local-eval-country-note-96362.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Capturing Metrics

Azure AI SDK automatically captures relevant invocation and usage metrics from each API call and logs them to Statsig.  You can see these events streaming in real-time in the console at: [https://console.statsig.com/metrics/events](https://console.statsig.com/metrics/events).

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/qHeIkFK7pmXzP5PM/images/integrations/azureai/capturing-metrics/cb4136eb-6ae9-4ffa-b560-333f332eaa75.png?fit=max&auto=format&n=qHeIkFK7pmXzP5PM&q=85&s=cca2eb8b4dc4b215d9a87df0e04c04ce" alt="Statsig console events streaming interface" width="1404" height="574" data-path="images/integrations/azureai/capturing-metrics/cb4136eb-6ae9-4ffa-b560-333f332eaa75.png" />
</Frame>

### Metrics captured

Completion invocations capture the following metrics automatically: completion token length, prompt token length, latency, model name, total token length.

For example, a completion API call results in a usage log that looks like this:

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-mintlify-add-local-eval-country-note-96362/qHeIkFK7pmXzP5PM/images/integrations/azureai/capturing-metrics/d9c150cc-eded-4607-aec8-d1631af77cec.png?fit=max&auto=format&n=qHeIkFK7pmXzP5PM&q=85&s=b22b0f4a1594e13c7145b02af1a30c48" alt="Azure AI completion API usage log example" width="797" height="774" data-path="images/integrations/azureai/capturing-metrics/d9c150cc-eded-4607-aec8-d1631af77cec.png" />
</Frame>

These could be used to compare multiple deployments with each other, and also to run experiments against different sets of parameters, aiding in optimization of cost, responsiveness, user experience, etc.
