AZ-104
Deep Dive
Application Insights is Azure Monitor's APM (Application Performance Management) solution. It provides deep application telemetry: requests, dependencies, exceptions, traces and availability. The AZ-104 exam evaluates its configuration and the per-service Insights solutions.
Contents
Application Insights is an extensible APM (Application Performance Monitoring) service that monitors live applications. It automatically detects performance anomalies, includes powerful diagnostic tools and works with multiple languages/frameworks.
Supported languages and frameworks
What it monitors
Where it is used
Classic vs Workspace-based
Classic (legacy)
Own isolated storage. No access from Log Analytics. Being deprecated.
Workspace-based (recommended)
Data is stored in a Log Analytics Workspace. KQL queries, unified RBAC, configurable retention, correlation with other workspace data.
Key concepts
• Instrumentation Key: unique key of the resource. Deprecated — migrate to Connection String.
• Connection String: complete connection configuration. Recommended for new apps.
• Sampling: to reduce data volume and costs. Adaptive sampling adjusts automatically.
• Live Metrics: real-time telemetry with no latency for debugging in production.
SDK (manual)
Include the NuGet/npm/pip package in the application and configure the Connection String. Maximum control over what is instrumented and how.
Advantages
Limitations
Auto-instrumentation (codeless)
Azure injects the agent automatically without modifying the code. Available in App Service, Azure Functions, and Java with an agent.
Advantages
Limitations
| Type | KQL table | What it captures | Example |
|---|---|---|---|
| Requests | requests | Incoming HTTP requests to the app | GET /api/orders — 200ms — Success |
| Dependencies | dependencies | Calls to external services (SQL, HTTP, Redis) | SQL query "SELECT * FROM Orders" — 50ms |
| Exceptions | exceptions | Unhandled exceptions and errors | NullReferenceException in OrderService.cs:42 |
| Traces | traces | Application text logs (ILogger, log4j) | Processing order 12345 |
| Custom Events | customEvents | Custom business events | OrderCompleted, UserRegistered, FeatureEnabled |
| Custom Metrics | customMetrics | Numeric business metrics | QueueLength=342, OrderValue=99.99 |
| Page Views | pageViews | Page views (browser SDK) | /checkout — 1.2s load — Chrome |
| Availability | availabilityResults | Availability test results | Ping https://myapp.com — Success — 120ms |
Application Map
Automatic visual map of the application's dependencies. Shows all components (frontend, backend, DBs, external APIs) and the performance of each connection. Quickly identifies bottlenecks and failures. Generated automatically from dependency data.
End-to-End Transaction Diagnostics
Correlates all operations of an end-to-end request: from the HTTP request, through SQL/Redis dependencies, to logs and exceptions — all with the same correlationId. Lets you see exactly what happened at each layer of the application during a specific transaction.
Availability Tests are periodic tests sent from multiple geographic Azure locations to verify that your application is available and responding correctly from the internet.
URL ping test
Simple HTTP GET to a URL. Checks response code and load time. Up to 5 simultaneous locations. Simplest and at no additional cost.
Standard test
Similar to URL ping but with support for SSL lifetime checks, custom HTTP verbs, custom headers, request body, response validation.
Custom TrackAvailability
You call the SDK with trackAvailability() to report results of custom availability tests — e.g. login tests, end-to-end business flows.
Configuring availability alerts
• Test frequency: 5, 10 or 15 minutes
• Locations: choose 5+ to detect regional outages
• Alert threshold: e.g. alert if 3 out of 5 locations fail
• Retry logic: the test retries before considering it a failure, to reduce false positives
• Results are stored in the availabilityResults table
Smart Detection is automatic detection of performance and failure anomalies using machine learning. It doesn't require configuring thresholds — it learns the app's normal behavior and alerts when it detects significant deviations.
Failure Anomalies
Detects abnormal increases in the failure rate of requests or dependencies, comparing against the app's historical baseline. It accounts for patterns like more failures on high-traffic days.
Performance Degradation
Detects degradation in response times of requests or dependencies. Alerts when the P90 percentile increases significantly relative to the baseline.
Memory Leak Detection
Detects memory usage growth patterns that suggest memory leaks. Useful for catching issues before they cause OOM in production.
Slow Page Load
Detects specific pages with abnormally slow load times compared to the history of the same page.
VM Insights
Predefined monitoring solution for VMs and VMSS. Provides curated performance views (CPU, memory, disk, network), a dependency map (which processes are connecting to what) and an agent data table.
• Requires: Azure Monitor Agent + Data Collection Rule
• Performance view: metrics for the top N VMs by CPU/memory
• Map view: visualization of TCP connections between processes and VMs
• Supports Azure Arc (on-premises machines)
• Data in tables: InsightsMetrics, VMComputer, VMConnection
Container Insights
Monitoring solution for AKS and containers. Collects metrics and logs from nodes, pods and containers.
• Enable from: AKS → Monitoring → Insights or from Azure Monitor
• Metrics: node and pod CPU and memory, pod count
• Container logs: stdout/stderr of each container
• Curated views: Cluster utilization, Node utilization, Pod failures
• Data in tables: ContainerLog, KubePodInventory, KubeNodeInventory
Did you get this topic?
Test what you just learned
A web application on Azure App Service is experiencing intermittent 500 errors. An administrator wants to see the full stack trace and correlate the errors with the database queries that preceded them. Which tool provides this visibility?
Put what you learned to the test with original AZ-104 exam questions.
Start AZ-104 mock examUnlimited mock exams with the Pro plan
Log in to track your progress.