Mastering Diagnostic Logging for Azure Foundry Tools: A Practical Guide
Mastering Diagnostic Logging for Azure Foundry Tools: A Practical Guide
Date: 2026-03-10
Unlock robust observability for your Azure Foundry resources by enabling diagnostic logging, exporting rich telemetry, and mastering log analytics with powerful Kusto queries.
Tags: ["Azure", "Diagnostics", "Foundry", "Logging", "Observability"]
If you manage Azure Foundry Tools resources, ensuring you have detailed insights into their operations is not optional—it’s critical. Diagnostic logging offers a window into the health, performance, and issues of your AI and cognitive services, empowering you to troubleshoot proactively and maintain reliable applications.
This guide walks you through enabling diagnostic logging for Foundry Tools such as Azure Speech, storing logs efficiently, and leveraging Azure’s rich analytics platforms like Log Analytics and Azure Storage. You’ll see how to configure log retention, visualize transactional metrics, and harness Kusto queries to extract meaningful, actionable intelligence from your diagnostic data.
By the end, you’ll understand how to set up a robust observability pipeline, from data generation through collection to insightful analysis, making operational excellence achievable for your Azure AI services.
Architecture Overview
┌─────────────────────────────────────────────┐
│ Azure Foundry Tools Resources │
├─────────────────────────────────────────────┤
│ • Azure Speech │
│ • Custom Question Answering │
│ • Other Cognitive Services │
└─────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Diagnostic Logging Pipeline │
├─────────────────────────────────────────────┤
│ • Diagnostic Settings Configuration │
│ • Metrics & Logs Collection │
│ • Storage Account & Log Analytics Workspace │
└─────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Analysis & Visualization Layers │
├─────────────────────────────────────────────┤
│ • Azure Storage Metrics Visualization │
│ • Log Analytics Queries & Dashboards │
│ • Excel Exports for Offline Analysis │
└─────────────────────────────────────────────┘
This flow depicts how diagnostic data from Foundry Tools moves through Azure’s monitoring ecosystem. Logs and metrics originate at the Foundry resource layer, then are configured for collection via diagnostic settings. The data then flows to Azure Storage and Log Analytics for retention and analysis, where users can query, visualize, and export the data for operational insights.
Key Technical Observations
-
Comprehensive Diagnostic Data Capture: Foundry Tools’ diagnostic settings support multiple log categories such as Audit, RequestResponse, and AllMetrics, enabling fine-grained monitoring across operational, security, and performance dimensions.
-
Flexible Storage Decoupling: Diagnostic logs can be archived to Azure Storage accounts residing in different subscriptions than the original resource, provided proper RBAC permissions. This enables centralized log management across diverse organizational units.
-
Integrated Dual-Channel Logging: Logs can simultaneously be sent to Azure Storage for long-term archival and to Log Analytics for advanced querying and visualization, combining durability with rich analytics.
-
Kusto Query Language (KQL) for Deep Insights: Log Analytics enables custom queries using KQL — a powerful, expressive language designed for fast, complex log search and analysis, e.g., aggregating average operation durations or visualizing logs over time.
-
Delayed Data Availability: Diagnostic data may take up to two hours to become queryable after configuration, an important consideration during troubleshooting or onboarding new logging.
-
Specialized Trace Logging: Trace-level diagnostic logging is specifically available only for the Custom question answering service, reflecting targeted traceability where it adds the most value.
How It Works
Enabling Diagnostic Logging via Azure Portal
-
Select Your Foundry Resource: In the Azure portal, locate the specific Foundry resource you want to monitor, such as Azure Speech.
-
Access Diagnostic Settings: Navigate through the left-hand menu under Monitoring, and select Diagnostic settings. This area lists any existing diagnostic configurations.
-
Create New Diagnostic Setting: If none exist or you want to add new, click + Add diagnostic setting.
-
Configure Log Destinations: Provide a descriptive name, then enable Archive to a storage account and Send to log Analytics.
-
Select Storage & Analytics Workspaces: Link your Azure Storage account and OMS workspace where logs will be archived and analyzed. If they don’t exist yet, the portal guides through creation.
-
Choose Log Categories: Enable Audit, RequestResponse, and AllMetrics categories to capture comprehensive diagnostic data.
-
Set Retention Policy: Define how long logs are retained. A retention of zero means data is kept indefinitely.
-
Save Configuration: Commit the settings. Expect up to two hours before data becomes available for querying.
Querying Data in Azure Storage
Azure Storage offers robust object storage for diagnostic logs, ideal for audit, backup, and offline analysis.
- Navigate to your Storage resource in the Azure portal.
- Under Monitoring > Metrics, configure metrics queries. For example, set the metric to
Transactionover the Last 30 days. - Visualize transaction patterns directly in the portal.
- Use the Export to Excel button to download metrics for offline, detailed analysis.
This capability is key for operational teams that want to integrate logs with external tools or perform periodic audits.
Exploring Logs in Log Analytics
Log Analytics provides a powerful KQL query interface to derive insights from raw logs.
- In the Azure portal, select your Log Analytics workspace.
- Under General > Logs, run queries against your Foundry diagnostic logs.
- Example queries:
// Get all diagnostic logs from Foundry Tools for a time period
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
// Most recent 10 logs
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| take 10
// Count of operations grouped by resource
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| summarize count() by Resource
// Average duration of operations by name
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| summarize avg(DurationMs) by OperationName
// Operation volume over time, grouped by operation
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
| summarize count() by bin(TimeGenerated, 10s), OperationName
| render areachart kind=unstacked
These queries enable operators and developers to detect bottlenecks, monitor usage patterns, and identify anomalies efficiently.
Quick Tips & Tricks
-
Enable Both Storage and Log Analytics Destinations
Send your diagnostics to Azure Storage for durable backups and to Log Analytics for flexible, real-time queries—leveraging the best of both worlds. -
Set Retention Thoughtfully
Use retention policies aligned with compliance and operational requirements. A zero retention keeps logs indefinitely, but consider storage costs and data relevance. -
Leverage Role-Based Access Control (RBAC)
Ensure proper RBAC permissions for the user configuring diagnostic settings, especially when linking storage accounts across subscriptions. -
Use KQL for Custom Insights
Master Kusto Query Language to craft targeted queries that fit your operational needs. Start with sample queries then iterate based on those insights. -
Automate Diagnostic Settings with CLI or PowerShell
For scaling or replicating configurations, enable diagnostics programmatically rather than manually via the portal. Refer to Azure Monitor docs for script syntax. -
Remember Data Availability Lag
Don’t expect instant log data after enabling diagnostic settings—allow up to two hours for ingestion and rendering in analytics tools.
Conclusion
Diagnostic logging is foundational for reliable operations of Azure Foundry Tools, delivering rich data that spans auditing, performance, and request analysis. Using Azure Storage alongside Log Analytics provides a scalable and flexible observability framework that supports troubleshooting, compliance, and proactive monitoring.
Understanding how to configure diagnostic settings correctly, navigate the analytics tools, and craft meaningful queries empowers engineering teams to turn raw telemetry into actionable intelligence. As Azure services continue evolving, diagnostic capabilities are becoming more sophisticated and essential for enterprise-grade AI deployments.
Investing time now in mastering diagnostic logging not only reduces firefighting but also unlocks insights that can improve application quality and user experience in the long run.
References
- Enable diagnostic logging - Foundry Tools | Microsoft Learn — Official step-by-step guide from Microsoft
- Azure Storage Overview — Understanding Azure's storage platform for log archival
- Log Analytics in Azure Monitor — How to query and analyze logs effectively
- Collect and consume log data from your Azure resources — Advanced logging and monitoring concepts
- Overview of metrics in Microsoft Azure — Insight into Azure metrics and their usage
- Kusto Query Language (KQL) overview — Learn to write powerful queries for Azure Monitor logs

Image credited to Microsoft Learn - Visual branding of Azure AI documentation