You have an App Service app that uses Azure SQL Database. Users report that some queries are slow. You need to monitor query performance and receive alerts when the average query duration exceeds 1 second. Which two Azure services should you use?
Trap 1: Azure Advisor
Azure Advisor acts as a personalized cloud consultant, providing actionable recommendations to optimize Azure deployments across five pillars: cost, security, reliability, operational excellence, and performance. It analyzes resource configurations and usage patterns over time to suggest improvements, but it does not offer real-time monitoring or granular insights into individual SQL query performance or duration from an application perspective. Its focus is on long-term best practices rather than immediate operational metrics.
Trap 2: Azure Monitor Logs
Azure Monitor Logs, powered by a Log Analytics workspace, is a robust platform for collecting, indexing, and querying log and telemetry data from various Azure resources and applications. While SQL Database diagnostic logs can be routed here, and custom KQL queries can extract performance insights, it primarily functions as a data store and query engine, not an out-of-the-box, real-time monitoring solution specifically designed for application-driven SQL query performance. It requires significant configuration and custom querying to achieve the desired level of specific query performance monitoring and alerting.
Trap 3: Azure SQL Analytics
Azure SQL Analytics, often integrated into the Azure portal as Query Performance Insight or Intelligent Insights for Azure SQL Database, is a specialized monitoring solution focused on database-side performance. It leverages the Query Store feature to collect detailed query execution statistics, including CPU usage, duration, and execution counts for individual queries. This tool provides deep insights into query plans, wait statistics, and resource consumption directly from the database engine, making it ideal for identifying and optimizing long-running or resource-intensive queries from the database perspective.
- A
Azure Advisor
Why wrong: Azure Advisor acts as a personalized cloud consultant, providing actionable recommendations to optimize Azure deployments across five pillars: cost, security, reliability, operational excellence, and performance. It analyzes resource configurations and usage patterns over time to suggest improvements, but it does not offer real-time monitoring or granular insights into individual SQL query performance or duration from an application perspective. Its focus is on long-term best practices rather than immediate operational metrics.
- B
Azure Monitor Alerts
Azure Monitor Alerts is a notification service that triggers actions based on specific conditions met by collected metrics or log data. While it can alert on high-level SQL Database metrics like CPU or DTU usage, it does not inherently collect or process the detailed, application-specific SQL query duration data required to alert on the performance of individual queries executed by an app. It serves as the alerting mechanism, but requires a suitable data source with the necessary granularity.
- C
Azure Monitor Logs
Why wrong: Azure Monitor Logs, powered by a Log Analytics workspace, is a robust platform for collecting, indexing, and querying log and telemetry data from various Azure resources and applications. While SQL Database diagnostic logs can be routed here, and custom KQL queries can extract performance insights, it primarily functions as a data store and query engine, not an out-of-the-box, real-time monitoring solution specifically designed for application-driven SQL query performance. It requires significant configuration and custom querying to achieve the desired level of specific query performance monitoring and alerting.
- D
Application Insights
Application Insights, a feature of Azure Monitor, provides comprehensive Application Performance Management (APM) by automatically collecting telemetry from your application, including HTTP requests, exceptions, and dependency calls. It specifically tracks SQL dependency calls, capturing their duration, success/failure, and the SQL command text, offering an application-centric view of database performance. This rich data enables direct visualization of SQL query performance within the Application Map and Performance blade, and allows for setting precise alerts based on the duration of these specific dependency calls.
- E
Azure SQL Analytics
Why wrong: Azure SQL Analytics, often integrated into the Azure portal as Query Performance Insight or Intelligent Insights for Azure SQL Database, is a specialized monitoring solution focused on database-side performance. It leverages the Query Store feature to collect detailed query execution statistics, including CPU usage, duration, and execution counts for individual queries. This tool provides deep insights into query plans, wait statistics, and resource consumption directly from the database engine, making it ideal for identifying and optimizing long-running or resource-intensive queries from the database perspective.