Monitoring & DevOps
on Microsoft Azure
Azure Monitor • Log Analytics • Azure DevOps • CI/CD Pipelines
Cloud Computing Course | Module 8
What We'll Cover Today
Why Monitoring Matters What is DevOps?
01 05
Observability: metrics, logs, and traces Culture + practices + tools
Azure Monitor Azure DevOps Services
02 The unified monitoring platform
06 Repos, Pipelines, Boards, Artifacts
Log Analytics & KQL GitHub Actions on Azure
03 07
Query and analyse logs at scale CI/CD with GitHub integration
Application Insights
04
APM for your apps and APIs
📊 Azure Monitor — Unified Observability
Azure Monitor is the single platform for collecting, analysing, and acting on telemetry from your Azure and on-premises resources.
It covers three pillars of observability: Metrics (numbers), Logs (events), and Traces (request flows).
📈 📋 🔍
Metrics Logs Traces
Numerical time-series data — CPU%, memory, request Structured records of events — what happened, when, Distributed tracing across microservices — follow a
count, latency. Collected every minute (or less). Used and why. Stored in Log Analytics workspace. Queried single request as it flows through your entire system.
for alerts and dashboards. with KQL. Powers Application Insights.
• VM CPU utilisation • HTTP request/response logs • End-to-end request duration
• App response time (ms) • Exception stack traces • Which service caused the slowdown
• Storage transactions/sec • Security audit events • Dependency call waterfall
• Custom application metrics • Resource activity logs • Correlation across services
Common Log Types in Cloud Environments
Log Type Description
Audit Logs Records who did what and when (e.g., "User X deleted S3 bucket Y").
VPC Flow Logs Captures information about the IP traffic going to and from network interfaces.
Application Generated by the code itself (e.g., stack traces, database connection errors).
Logs
Resource Logs Health and performance metrics for the cloud infrastructure (CPU usage, disk
I/O).
Log Analytics & KQL — Query Your Logs
Azure Log Analytics is a workspace where all your log data is stored and queried. Kusto Query Language (KQL) is the query language
used to filter, aggregate, and visualise that data — similar to SQL but optimised for time-series log data.
KQL Examples — Each query runs in seconds across billions of rows 🔔 Alerts
// Find all errors in last hour Trigger notifications or auto-remediation when a KQL query
returns results above a threshold.
AzureDiagnostics
| where Level == 'Error'
| where TimeGenerated > ago(1h)
| project TimeGenerated, Resource, Message 📊 Dashboards
| order by TimeGenerated desc
Pin KQL query results to Azure Dashboards or Power BI for
// Top 5 slowest API endpoints always-on operational visibility.
requests
| where success == false or duration > 500
| summarize avg(duration) by name 🔍 Workbooks
| top 5 by avg_duration desc
Interactive reports combining KQL queries, text, and charts —
shareable across your team.
// VM CPU alert threshold
Perf
| where ObjectName == 'Processor' 🤖 Runbooks
| where CounterName == '% Processor Time'
| where CounterValue > 85
| project TimeGenerated, Computer, CounterValue Trigger Azure Automation runbooks from alerts to auto-fix
common issues — e.g. restart a VM.
🔬 Application Insights — APM for Your Apps
Application Insights (part of Azure Monitor) is a full APM (Application Performance Management) service. Add one SDK to your app
and you instantly get request tracking, exception reporting, dependency monitoring, user sessions, and custom events — with zero
infrastructure to manage.
⚡ 🗺 ❌
Live Metrics Application Map Failure Analysis
Real-time stream of incoming requests, failures, and Visual topology of your entire system — every service, Automatically groups exceptions and failed requests.
server health. See the impact of a deployment within database, and external dependency shown with health Shows stack traces, affected users, and links to the
seconds of releasing. status and latency. offending code line.
📏 👥 🔔
Performance Profiler User Analytics Smart Detection
Code-level profiling in production — finds the exact Track user flows, session length, page views, and AI automatically detects anomalies — unexpected
method causing slowdowns without requiring a custom events. Answer 'how are people using my spikes in failure rate, memory leaks, or abnormal
debugger. app?' with real data. response time degradation.
What is DevOps?
DevOps is a culture, set of practices, and collection of tools that combines software Development and IT Operations. The goal:
shorten the development lifecycle and deliver high-quality software faster and more reliably — through automation, collaboration,
and continuous feedback.
The DevOps Infinity Loop
Core DevOps Practices
⚙ Operate
🔄 Continuous Integration (CI)
☁ Deploy 📊 Monitor
Developers merge code frequently. Every merge triggers an automated build and test
run — catching bugs early.
🚀 Release 📋 Plan
🚀 Continuous Delivery (CD)
Every successful build is automatically packaged and ready to deploy. Deployment to
production is a one-click (or zero-click) action.
🧪 Test 💻 Code
🔨 Build 🏗 Infrastructure as Code (IaC)
Define infrastructure in code files (Bicep, Terraform, ARM). Version-controlled,
repeatable, no manual clicks.
📊 Continuous Monitoring
Observe production in real time. Metrics and alerts close the feedback loop —
problems detected before users notice.
Azure DevOps Services — The Full Toolchain
📋 📁 ⚙ 📦
Azure Boards Azure Repos Azure Pipelines Azure Artifacts
Agile project management — Kanban Git-based source control with branch CI/CD automation — build, test, and deploy Package management for npm, NuGet,
boards, sprints, backlogs, and work item policies, pull requests, and code review to any cloud or on-premises target. Maven, Python, and Universal Packages.
tracking. Supports Scrum, Kanban, and workflows. Unlimited private repos Supports any language, any platform, any Share packages across teams with
custom processes. included. cloud. versioning and access control.
✦ User stories & epics ✦ Branch protection policies ✦ YAML-defined pipelines ✦ Private package feeds
✦ Sprint planning & velocity ✦ Pull request reviews ✦ Multi-stage deployments ✦ Upstream caching
✦ Burn-down charts ✦ Code search ✦ Environment approvals ✦ Artifact promotion
✦ Links to code & builds ✦ Fork-based workflows ✦ 500 free CI minutes/month ✦ Retention policies
GitHub Actions — CI/CD on Azure
GitHub Actions is a CI/CD platform built directly into GitHub. Workflows are YAML files stored in your repo — triggered by push, pull
request, schedule, or manual dispatch. Azure provides first-class Actions for deploying to App Service, AKS, Azure Functions, and
more.
Example CI/CD Pipeline — Push to main → live in Azure
💻 ⚡ 🔨 📦 ☁ 📊
→ → → → →
Code Push Trigger Build & Build Deploy to Monitor
git push Workflow Test Docker Image Azure & Alert
Sample workflow YAML (.github/workflows/[Link]) 🔁 Triggers
push, pull_request, schedule (cron), workflow_dispatch (manual), or any
name: Deploy to Azure App Service GitHub event
on: [push]
jobs: 🌍 Azure Actions
build-and-deploy: azure/login, azure/webapps-deploy, azure/aks-set-context,
azure/functions-action
runs-on: ubuntu-latest
steps: 🔒 Secrets
- uses: actions/checkout@v3 Store Azure credentials as GitHub Secrets — never in code. Use OIDC for
- uses: azure/webapps-deploy@v2 passwordless auth.
with: { app-name: my-webapp }
Key Takeaways
Azure Monitor is your observability foundation
📊 Metrics, logs, and traces — all in one place. Set alerts and dashboards before you go to production, not after an outage.
Log Analytics + KQL is a superpower
🔍 Query billions of log events in seconds. Start with simple filters and grow into dashboards and automated alerts.
Application Insights tells you what your app is doing
🔬 Request rates, failure rates, latency, user flows — all with one SDK. Use Smart Detection to catch issues before users report them.
DevOps is culture first, tools second
🔄 CI/CD, IaC, and monitoring close the feedback loop between development and operations — enabling faster, safer releases.
Automate everything with Pipelines or Actions
🚀 Whether Azure DevOps or GitHub Actions, define your pipeline as code — version controlled, repeatable, and auditable.
Next: Module 9 — Cost Management & Governance (Pricing, Budgets, Azure Policy)
📖 Module 8 Glossary — Monitoring & DevOps
Term Definition Analogy 💡
Azure Monitor The unified platform for collecting, analysing, and The control room of a factory. Every machine sends its status here — operators
acting on telemetry (metrics, logs, traces) from Azure see everything on one screen and get alerted if something goes wrong.
and on-premises resources.
Log Analytics A workspace in Azure Monitor where log data is stored A searchable filing system for every event that ever happened in your
and queried using KQL. Aggregates logs from VMs, environment. Instead of shuffling through folders, you type a query.
containers, apps, and Azure services.
KQL Kusto Query Language — the language used to query The search bar for your logs, but with superpowers. Instead of 'find error', you
Log Analytics data. Similar to SQL but optimised for write 'show me the top 10 errors from the last hour, grouped by service'.
time-series log analysis and aggregation.
Application Insights An APM (Application Performance Management) A black box recorder for your app. It silently records everything happening —
service that monitors your live application — tracking who visited, what failed, how long it took — ready to replay when something
requests, exceptions, dependencies, and user goes wrong.
behaviour.
CI/CD Continuous Integration (automatically build and test A car assembly line. Every part is tested as it's added (CI); when the car passes
on every code change) and Continuous Delivery inspection, it rolls off the line automatically (CD) — no manual handoff.
(automatically prepare and deploy successful builds).
Infrastructure as Code Defining and managing cloud infrastructure using code A blueprint for a house. Instead of describing verbally what you want, you hand
files (Bicep, Terraform, ARM templates) instead of the builder a precise set of drawings — reproducible every time.
clicking through the portal manually.
Analogies are simplified comparisons to help build intuition.