Learn

๐Ÿ“Œ Problem You need to monitor, analyze, and control the usage and performance of Azure AI services to optimize cost, detect issues, and ensure service health.

โœ… Solution with Azure Use Azure Monitor, Cost Management, Alert Rules, Diagnostic Logging, and Dashboards to monitor usage, manage costs, and diagnose problems in Azure AI services.

๐Ÿงฉ Required Components * Azure Pricing Calculator * Azure Cost Management + Billing * Azure Monitor * Metrics and Alerts * Azure Log Analytics workspace * Azure Storage account * Diagnostic settings configuration * Azure Dashboards

๐Ÿ—๏ธ Architecture / Development

๐Ÿงพ Monitor costs * Use Azure Pricing Calculator to estimate costs before deployment. * Select service (e.g., Azure AI Language), region, tier, usage metrics. * Save/export estimate in Excel. * Use Cost Analysis in Azure portal to monitor actual costs. * Apply filters to see only Azure AI Services usage.

๐Ÿšจ Create alerts * Navigate to your resource โ†’ Alerts tab โ†’ Add alert rule. * Define: * Scope: AI service resource * Condition: Metric (e.g., error count) or Activity Log (e.g., key regeneration) * Action: Email, Logic App, etc. * Alert details: Name, resource group

๐Ÿ“Š View metrics * Use Metrics blade on AI resource to: * Add custom charts (e.g., call count, error rate) * Export or link charts * Create Dashboards with: * Up to 100 tiles combining multiple visualizations * Add metric charts directly from resources

๐Ÿงพ Manage diagnostic logging * Create storage destinations: * Azure Log Analytics (for querying/log visualization) * Azure Storage (for archival/export) * Configure on Diagnostic settings: * Define name, categories of logs/metrics, destinations * View diagnostic data: * Wait up to 1 hour for data flow * Use Log Analytics query interface to analyze logs

๐Ÿง  Best Practices / Considerations * Use free tier for testing to reduce costs. * Always create estimates before provisioning. * Set up alerts for error thresholds and key operations. * Use dashboards for centralized monitoring. * Configure diagnostics to send logs to both Log Analytics and Storage. * Ensure storage accounts are in the same region as AI resources for latency/cost efficiency.

โ“ Simulated Exam Questions 1. ๐Ÿงฎ How can you estimate costs for multiple Azure AI services before deployment? โžค Use the Azure Pricing Calculator, select services and input expected usage. 2. ๐Ÿ’ฐ Where can you view the accumulated cost of Azure AI services in the portal? โžค Use Cost Analysis and filter by service name = "Azure AI Services". 3. ๐Ÿšจ What types of signals can trigger an alert rule in Azure AI services? โžค Activity Log (e.g., key regeneration), Metric (e.g., error count > 10). 4. ๐Ÿ“Š How do you add service metrics to a shared view? โžค Use Metrics โ†’ add chart โ†’ Add to Dashboard. 5. ๐Ÿ› ๏ธ Which resources must be created before enabling diagnostic logging? โžค Azure Log Analytics and/or Azure Storage. 6. ๐Ÿ” Where can you analyze captured diagnostic data for an AI resource? โžค In Azure Log Analytics, using query interface.