Microsoft Azure
Training Day: Migrating and modernizing
your apps to the cloud
Debugging and Interacting with
Production Applications
Michel Hubert
CTO Infeeny
Why is working with production apps difficult?
Frustrations with
getting exceptions /
logs / data
Issues caused by
config, data, and scale
Acquiring and
configuring the
tools
Monitoring Landscape – Apps & Infrastructure
Apps NetworkInfrastructure
In this session …
Azure Monitor
Azure Monitor
Advanced diagnostics and
analytics powered by
machine learning
capabilities
Data Driven Insights
Rich ecosystem of popular
DevOps, issue management,
SIEM, and ITSM tools
Workflow Integrations
A common platform
for all metrics, logs and
other monitoring
telemetry
Unified Monitoring
Metrics Log
Common Store
Full observability for your infrastructure, app and network
Signals and Sources in Azure
Azure
Subscriptions
Security Center
Resource Manager
Service Health
Azure
Resources
Network Security Groups
Virtual Machines
Storage Accounts
Guest OS
(‘user space’)
Linux syslog
Windows Perf Counters
Application
User telemetry
Application logs
Azure Tenants Azure Active Directory
Signals
Sources
Unified
Monitoring
Metrics
Logs
Application Container VM Monitoring
Solutions
Insights
Dashboards Views Power BI Workbooks
Visualize
Metrics Explorer Log Analytics
Analyze
Alerts Autoscale
Respond
Event Hubs Ingest &
Export APIs
Logic Apps
Integrate
Azure Monitor
Custom Sources
Application
Operating System
Azure Resources
Azure Subscription
Azure Tenant
Wiring It All Up
Metrics
Logs
Azure Monitor
Custom Sources
Application
Operating System
Azure Resources
Azure Subscription
Azure Tenant
Logs & Metrics
emitted by Azure
Diag. Extensions +
Agents
Windows + Linux Support
Workload Agnostic
Application Insights
SDK Driven
Multi-Language Support
For everything else
Application Insights
Application Monitoring and Analytics
Visibility Insights Optimization
Get the big picture
Find & fix
problems
Build, measure, learn
Azure
Application
Insights
Visibility – Get the big
picture
Insights – Find & fix
problems
Optimization – Build,
measure, learn
Application Insights Overview
Telemetry is collected at
each tier: mobile
applications, server
applications and browser
Telemetry arrives in the
Application Insights service
in the cloud where it is
processed & stored
Get a 360° view of the
application including
availability, performance
and usage patterns
Sources of Telemetry
1 Outside-in monitoring
Observed user behavior2
Developer traces and events3
Observed application behavior4
Infrastructure performance5
Intelligent Application Performance Monitoring (APM)
Instant Analytics
Integrations with DevOps Tools
App Map to Pinpoint Problem Server
Correlated tracing across servers
Log Analytics
Run analytics queries for
investigations, statistics, and
root cause + trend analysis
Log Analytics advanced query
experience now in Azure Portal
Utilize ML algorithms for
clustering and anomaly
detection
RBAC per type
Azure Monitor Logs
Using Analytics to Dig Deeper
Snapshot Debugging
Introducing Snapshot Debugging
Introducing Snapshot Debugging
Introducing Snapshot Debugging
Debugging Locally
Snapshot Debugging
Deployment Slots
What is a Deployment slot?
What is a deployment slot?
Deployment
Slots
In review …
Debugging and interacting with production applications

Debugging and interacting with production applications

Editor's Notes

  • #7 Why is working with production apps usually difficult? There are a number of reasons. It can be difficult to pull logs and data. Tracking sessions is complicated when there are multiple load-balanced instances. Tools may be scattered and hard to find and configure.
  • #10 Let’s talk about Azure’s over-arching solution for monitoring.
  • #15  On overview, show the Http 5x, data in, data out, etc. and explain this is part of monitoring Open log streaming and navigate the site, show the streaming Explain Application Insights is a part of Azure Monitor and you’ll explore those details next Note: logs turn off automatically after 12 hours
  • #18 This is an example dashboard. From one place you can (reiterate bullets here).
  • #19 This is an overview of how Application Insights works.
  • #20 Application insights is designed to handle telemetry from all areas of the stack. It’s “outside-in” meaning monitoring starts at the client (mobile, desktop, browser, game console, or edge device), allows for user-focused events, collects custom developer traces/events and standard telemetry emitted by the platform and infrastructure.
  • #21 Application insights provides intelligent performance monitoring, looking across the full stack and tracking performance through layers of dependencies.
  • #22 All of the data collected by Application Insights can be analyzed using a powerful built-in analytics query language.
  • #23 Application Insights can be integrated to your DevOps workflow, for example by providing a gate the prevents an application from being promoting to production unless specific performance levels are met in the staging environment.
  • #24 Application Insights automatically provides an application map that is generated based on observed dependencies between components of your application.
  • #25 With Application Insights, drilling into a transaction is possible with correlating tracing that maps the entire interaction from the browser down to the database.
  • #26 Navigate to Application Insights and show the overview Click on the Application Map Click on the SQL speed and in the right pane choose “investigate performance” Show the results Go to Live Metrics stream. Collapse “Outgoing requests” and “Overall Health.” Navigate the site and show the results in Live Stream. Show the Performance graph
  • #27 Let’s take a closer look at how to analyze your collected telemetry.
  • #28 Log analytics provides query capabilities directly from the portal. It can be locked down with role-based security and features built-in algorithms for detecting anomalies and clusters in the data.
  • #29 The data provided by log analytics can be displayed as a table or in a variety of different chart formats. You can easily save queries to reuse later.
  • #30 Open application insights Click on Logs (Analytics) Open Help -> Documentation -> Tutorials -> Log Queries Go to “Sample queries” -> Reports failures -> Exceptions causing request failures Explain the query Show “Requests’ performance” -> response time trend Show different options to plot, graph, etc.
  • #32 Snapshot debugging is a powerful feature that allows you to debug your application in production.
  • #33 It is designed to support distributed applications.
  • #34 As with other Azure services, it supports role-based access control.
  • #35 Debugging locally is straightforward because there is typically one instance of the app running on a single server.
  • #36 The cloud complicates things. In production, you have multiple users each accessing your distributed application with instances spanning multiple servers. How do you debug a specific end-to-end experience?
  • #37 Snapshot debugging captures the unique callstack for a specific session so you can debug without having to understand which client or server was part of the end-to-end flow that resulted in an exception.
  • #38 Navigate to Application Insights Navigate to Failures Drill into an operation on the right panel Click on “drill into operations” Click on an operation to open the snapshot Click “open debug snapshot” in the right If necessary, add the debugger role Optional: if you have VS Enterprise, download the snapshot and open it there Explain it is a NuGet package added to the code
  • #39 As a last step, once you’ve identified, triaged, diagnosed and repaired an issue, what is the safest way to roll out your update? Deployment slots make the process of patching code safe and seamless.
  • #40 A deployment slot is simply another instance of your application that runs in the same process with it’s own version of code and settings. It allows you to run a configuration in the target environment side-by-side with your production application.
  • #41 Deployment slots can handle multiple scenarios, from staging environments to run smoke tests before turning code on in production to canary testing so that you can pilot a change on a small percentage of users to evaluate before doing a larger scale rollout.
  • #42 Deployment slots enable you to …
  • #43 TBD
  • #45 And that’s a statement around how we feel about Azure. We want to invent with purpose in how we think about it what we deliver to you but also enable you to invent with purpose. And we do that in some key ways. TRANSITION: I talk about these ways as our promises to you on what Azure will always deliver and why we’ll help you.