What is going on - Application diagnostics on Azure - TechDays Finland

Maarten Balliauw
Maarten BalliauwDeveloper Advocate
What is going on?
Application Diagnostics on Azure
Maarten Balliauw
@maartenballiauw
Agenda
What is going on?
Application Insights
the service
the developer side (SDK)
Application Insights Analytics
What is going on?
Log all the things!
System.Diagnostics.Trace.TraceInformation(
"Something happened");
System.Diagnostics.Trace.TraceWarning(
"Error! " + ex.Message);
And here’s a typical log...
App.exe [12:13:03:985] Information: 0 : Customer address updated.
App.exe [12:13:04:011] Error: 8 : System.NullReferenceException occurred. Value
can not be null.
App.exe [12:13:04:567] Information: 0 : Machine policy value 'Debug' is 0
App.exe [12:13:04:569] Verbose: 9 : ******* RunEngine
******* Action:
******* CommandLine: **********
App.exe [12:13:04:578] Information: 9 : Entered CheckResult()
App.exe [12:13:04:689] Debug: 0 : Created. Req=0, Ret=8, Font: Req=null
Does this help troubleshooting? Improve the application? Analyze trends?
No.
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do not measure CPU, memory, I/O, ...
How to get data off our machines?
How to report/analyze?
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do not measure CPU, memory, I/O, ...
How to get data off our machines?
How to report/analyze?
Semantic Logging
(e.g. ETW, Serilog, ...)
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do not measure CPU, memory, I/O, ...
How to get data off our machines?
How to report/analyze?
Windows Server tooling,
NewRelic, PRTG, SNMP, ...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do not measure CPU, memory, I/O, ...
How to get data off our machines?
How to report/analyze?
Vendor tooling, NewRelic, PRTG,
SNMP, ...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do not measure CPU, memory, I/O, ...
How to get data off our machines?
How to report/analyze? Splunk, LogStash, Kibana, ...
Analytics suck!
Either use vendor tooling
What with x-plat deployments?
Either build it ourselves
Lots of components, management overhead, ...
All we wanted was logging and correlation...
Application Insights
Application Insights
”Application Insights is an extensible Application Performance
Management (APM) service for web developers on multiple
platforms.”
Application Insights
Azure Service + Library/SDK
Solves “where to store”, “how to ship”, “how to analyze”
Enriches data with telemetry
Correlates data (e.g. client + server + dependency/DB/...)
Allows structured logging
Allows rich querying, alerting
Works for many, many platforms and languages
Web, Windows, Xamarin, any application type really
.NET, Java, JavaScript, Objective-C, PHP, Python, Ruby, ...
Docker (host and container)
Application Insights
Getting Started
DEMO
Do I have to run on Azure?
REST API to send data to
Various tools and SDK’s to collect data specific to language/platform
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-platforms
docker run -v
/var/run/docker.sock:/docker.sock -d
microsoft/applicationinsights
ikey=000000-1111-2222-3333-444444444
IIS Docker host and containers
Application Insights
– the service
Application Insights
Let’s focus on this
part for a bit.
Monitoring, alerting,
exporting
DEMO
Input, processing, output
DATA INGESTION
Performance Counters
Requests (both server/client side)
Traces
Exceptions
Dependencies
Custom Metrics & Events
...
CAPABILITIES
Monitoring
Alerting
Querying
Exporting
Application Insights
– the developer side
Application Insights
Let’s focus on this
part for a bit.
Data being collected
AUTOMATICALLY
Performance Counters
Requests (both server/client side)
Traces
Exceptions
Dependencies
Custom Metrics & Events
...
ENRICH MANUALLY
Better tracing (semantic logging!)
Events
Metrics
Exceptions
Telemetry pipeline
...
Better tracing
Don’t do stupid strings.
System.Diagnostics.Trace is nice, but also not nice.
Do semantic logging!
Serilog, .NET Core logging have an Application Insights sink
All else: write a sink or log directly to TelemetryClient.Current
Better tracing
DEMO
Events and Metrics
Send custom events and metrics
Name of event/metric + a value
Events – help find how the application is used and can be optimized
User resized column in a grid
User logged in
User clicked “Share”
...
Metrics – help measuring quantifyable data
# Items in shopping cart
...
Events and Metrics
DEMO
Exceptions
Exceptions are unpleasant.
How to make them more pleasant?
Stack traces? MiniDump?
Exceptions
DEMO
Snapshots! (MiniDump)
NuGet package
MinidumpUploader.exe
separate process which monitors snapshot requests
SnapshotHolder_x64.exe
creates a shadow process in 10-20ms, captures the minidump, returns it to
MinidumpUploader.exe
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-
snapshot-debugger
Enriching telemetry
Why?
Enriching telemetry – adding properties to all data
Obfuscating telemetry – GDPR, sensitive data, ...
How?
Directly adding data on TelemetryClient.Current
Using the telemetry pipeline (middlewares on sending data to AI service)
https://blog.maartenballiauw.be/post/2017/01/31/application-insights-telemetry-processors.html
Enriching telemetry
DEMO
Application Insights
Analytics
Application Insights Analytics
Former MS-internal tool “Kusto”
Near-realtime log ingestion and analysis
Lets you run custom queries
requests
| where timestamp > ago(24h)
| summarize count() by client_CountryOrRegion
| top 10 by count_
| render piechart
Queries over logs!
Input dataset
traces
customEvents
pageViews
requests
dependencies
exceptions
availabilityResults
customMetrics
performanceCounters
browserTimings
| Operators
where
count
project
join
limit
order
| Renderer
table
chart (bar, pie, time, area, scatter)
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-analytics-reference
Smart Detection
Uses Application Insights Analytics data and searches for trends and anomalies
Potential memleaks – memory increase
Increase in specific exceptions
Abnormal rise in failed requests
...
Each detection comes with a query!
Application Insights
Analytics
DEMO
What else is there?
Other client types (mobile, Java, ...)
Sampling our data (in portal)
Do we need all data? Or just data that is representative enough?
Release annotations
Show a marker in the timeline when a release happens
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-annotations
Profiler
Preview that I can’t get to work, but should do profiling when interesting things
happen
https://docs.microsoft.com/en-us/azure/application-insights/app-insights-profiler
Conclusion
Conclusion
Logging sucks
Application Insights
the service – collect and ingest, analyze, different views
the developer side (SDK) – enrich, customize, …
Application Insights Analytics
rich querying over all data
base for automated insights/smart detection
Thank you!
Please do not forget to evaluate the
session before you leave by using our
Lollipolls!
http://blog.maartenballiauw.be
@maartenballiauw
1 of 43

Recommended

ConFoo - Exploring .NET’s memory management – a trip down memory lane by
ConFoo - Exploring .NET’s memory management – a trip down memory laneConFoo - Exploring .NET’s memory management – a trip down memory lane
ConFoo - Exploring .NET’s memory management – a trip down memory laneMaarten Balliauw
523 views37 slides
Going serverless with azure functions by
Going serverless with azure functionsGoing serverless with azure functions
Going serverless with azure functionsgjuljo
702 views35 slides
NashTech - Azure Application Insights by
NashTech - Azure Application InsightsNashTech - Azure Application Insights
NashTech - Azure Application InsightsPhi Huynh
1.4K views23 slides
Mastering Azure Monitor by
Mastering Azure MonitorMastering Azure Monitor
Mastering Azure MonitorRichard Conway
460 views37 slides
Monitor Cloud Resources using Alerts & Insights by
Monitor Cloud Resources using Alerts & InsightsMonitor Cloud Resources using Alerts & Insights
Monitor Cloud Resources using Alerts & InsightsSynergetics Learning and Cloud Consulting
297 views49 slides
Azure Container Services​ by
Azure Container Services​Azure Container Services​
Azure Container Services​Pedro Sousa
322 views8 slides

More Related Content

What's hot

Lets talk about: Azure Kubernetes Service (AKS) by
Lets talk about: Azure Kubernetes Service (AKS)Lets talk about: Azure Kubernetes Service (AKS)
Lets talk about: Azure Kubernetes Service (AKS)Pedro Sousa
330 views19 slides
Realtà aumentata ed Azure, un binomio imbattibile by
Realtà aumentata ed Azure, un binomio imbattibileRealtà aumentata ed Azure, un binomio imbattibile
Realtà aumentata ed Azure, un binomio imbattibileAlessio Iafrate
127 views46 slides
Presentation Tier optimizations by
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizationsAnup Hariharan Nair
2.2K views25 slides
Praveen Kumar Resume by
Praveen Kumar ResumePraveen Kumar Resume
Praveen Kumar Resumepraveen Kothuri.Praveen
194 views4 slides
Best practices with Microsoft Graph: Making your applications more performant... by
Best practices with Microsoft Graph: Making your applications more performant...Best practices with Microsoft Graph: Making your applications more performant...
Best practices with Microsoft Graph: Making your applications more performant...Microsoft Tech Community
2.2K views27 slides
Debugging and Interacting with Production Applications - MS Online Tech Forum by
Debugging and Interacting with Production Applications - MS Online Tech ForumDebugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech ForumDavide Benvegnù
144 views32 slides

What's hot(20)

Lets talk about: Azure Kubernetes Service (AKS) by Pedro Sousa
Lets talk about: Azure Kubernetes Service (AKS)Lets talk about: Azure Kubernetes Service (AKS)
Lets talk about: Azure Kubernetes Service (AKS)
Pedro Sousa330 views
Realtà aumentata ed Azure, un binomio imbattibile by Alessio Iafrate
Realtà aumentata ed Azure, un binomio imbattibileRealtà aumentata ed Azure, un binomio imbattibile
Realtà aumentata ed Azure, un binomio imbattibile
Alessio Iafrate127 views
Best practices with Microsoft Graph: Making your applications more performant... by Microsoft Tech Community
Best practices with Microsoft Graph: Making your applications more performant...Best practices with Microsoft Graph: Making your applications more performant...
Best practices with Microsoft Graph: Making your applications more performant...
Debugging and Interacting with Production Applications - MS Online Tech Forum by Davide Benvegnù
Debugging and Interacting with Production Applications - MS Online Tech ForumDebugging and Interacting with Production Applications - MS Online Tech Forum
Debugging and Interacting with Production Applications - MS Online Tech Forum
Davide Benvegnù144 views
Innovation anywhere with microsoft azure arc by GoviccaSihombing
Innovation anywhere with microsoft azure arcInnovation anywhere with microsoft azure arc
Innovation anywhere with microsoft azure arc
GoviccaSihombing117 views
Ado.Net Data Services (Astoria) by Igor Moochnick
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick2.6K views
Sergii Baidachnyi ITEM 2018 by ITEM
Sergii Baidachnyi ITEM 2018Sergii Baidachnyi ITEM 2018
Sergii Baidachnyi ITEM 2018
ITEM98 views
Azure Container Instance by Bishoy Demian
Azure Container InstanceAzure Container Instance
Azure Container Instance
Bishoy Demian311 views
Azuresatpn19 - An Introduction To Azure Data Factory by Riccardo Perico
Azuresatpn19 - An Introduction To Azure Data FactoryAzuresatpn19 - An Introduction To Azure Data Factory
Azuresatpn19 - An Introduction To Azure Data Factory
Riccardo Perico170 views
Intro to docker and kubernetes by Mohit Chhabra
Intro to docker and kubernetesIntro to docker and kubernetes
Intro to docker and kubernetes
Mohit Chhabra309 views
Improve monitoring and observability for kubernetes with oss tools by Nilesh Gule
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss tools
Nilesh Gule70 views

Similar to What is going on - Application diagnostics on Azure - TechDays Finland

What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group by
What is going on? Application Diagnostics on Azure - Copenhagen .NET User GroupWhat is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
What is going on? Application Diagnostics on Azure - Copenhagen .NET User GroupMaarten Balliauw
6K views51 slides
Monitoring as Software Validation by
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software ValidationBioDec
1.1K views24 slides
SplunkLive! Zurich 2018: Integrating Metrics and Logs by
SplunkLive! Zurich 2018: Integrating Metrics and LogsSplunkLive! Zurich 2018: Integrating Metrics and Logs
SplunkLive! Zurich 2018: Integrating Metrics and LogsSplunk
524 views44 slides
Public v1 real world example of azure functions serverless conf london 2016 by
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016 Yochay Kiriaty
1.2K views35 slides
Observability foundations in dynamically evolving architectures by
Observability foundations in dynamically evolving architecturesObservability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architecturesBoyan Dimitrov
1.2K views49 slides
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser... by
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...VMware Tanzu
424 views34 slides

Similar to What is going on - Application diagnostics on Azure - TechDays Finland(20)

What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group by Maarten Balliauw
What is going on? Application Diagnostics on Azure - Copenhagen .NET User GroupWhat is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
Maarten Balliauw6K views
Monitoring as Software Validation by BioDec
Monitoring as Software ValidationMonitoring as Software Validation
Monitoring as Software Validation
BioDec1.1K views
SplunkLive! Zurich 2018: Integrating Metrics and Logs by Splunk
SplunkLive! Zurich 2018: Integrating Metrics and LogsSplunkLive! Zurich 2018: Integrating Metrics and Logs
SplunkLive! Zurich 2018: Integrating Metrics and Logs
Splunk524 views
Public v1 real world example of azure functions serverless conf london 2016 by Yochay Kiriaty
Public v1 real world example of azure functions serverless conf london 2016 Public v1 real world example of azure functions serverless conf london 2016
Public v1 real world example of azure functions serverless conf london 2016
Yochay Kiriaty1.2K views
Observability foundations in dynamically evolving architectures by Boyan Dimitrov
Observability foundations in dynamically evolving architecturesObservability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architectures
Boyan Dimitrov1.2K views
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser... by VMware Tanzu
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
SpringOne Tour Denver - Spring Boot & Spring Cloud on Pivotal Application Ser...
VMware Tanzu424 views
Strata 2016 - Architecting for Change: LinkedIn's new data ecosystem by Shirshanka Das
Strata 2016 - Architecting for Change: LinkedIn's new data ecosystemStrata 2016 - Architecting for Change: LinkedIn's new data ecosystem
Strata 2016 - Architecting for Change: LinkedIn's new data ecosystem
Shirshanka Das6.8K views
Architecting for change: LinkedIn's new data ecosystem by Yael Garten
Architecting for change: LinkedIn's new data ecosystemArchitecting for change: LinkedIn's new data ecosystem
Architecting for change: LinkedIn's new data ecosystem
Yael Garten786 views
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie by VMware Tanzu
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
VMware Tanzu867 views
Sherlock Homepage - A detective story about running large web services - WebN... by Maarten Balliauw
Sherlock Homepage - A detective story about running large web services - WebN...Sherlock Homepage - A detective story about running large web services - WebN...
Sherlock Homepage - A detective story about running large web services - WebN...
Maarten Balliauw2.2K views
Building an Observability Platform in 389 Difficult Steps by DigitalOcean
Building an Observability Platform in 389 Difficult StepsBuilding an Observability Platform in 389 Difficult Steps
Building an Observability Platform in 389 Difficult Steps
DigitalOcean29 views
Application telemetry public by Lars Yde
Application telemetry publicApplication telemetry public
Application telemetry public
Lars Yde418 views
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th... by MongoDB
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB339 views
Scaling Experimentation & Data Capture at Grab by Roman
Scaling Experimentation & Data Capture at GrabScaling Experimentation & Data Capture at Grab
Scaling Experimentation & Data Capture at Grab
Roman 459 views
IMC Summit 2016 Breakout - Matt Coventon - Test Driving Streaming and CEP on ... by In-Memory Computing Summit
IMC Summit 2016 Breakout - Matt Coventon - Test Driving Streaming and CEP on ...IMC Summit 2016 Breakout - Matt Coventon - Test Driving Streaming and CEP on ...
IMC Summit 2016 Breakout - Matt Coventon - Test Driving Streaming and CEP on ...
Splunk for vmware virtualization customer presentation by Greg Hanchin
Splunk for vmware virtualization customer presentationSplunk for vmware virtualization customer presentation
Splunk for vmware virtualization customer presentation
Greg Hanchin1.5K views

More from Maarten Balliauw

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
360 views64 slides
Building a friendly .NET SDK to connect to Space by
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
182 views47 slides
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
406 views52 slides
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
180 views32 slides
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
326 views53 slides
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
280 views42 slides

More from Maarten Balliauw(20)

Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s... by Maarten Balliauw
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Maarten Balliauw360 views
Building a friendly .NET SDK to connect to Space by Maarten Balliauw
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
Maarten Balliauw182 views
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo... by Maarten Balliauw
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Maarten Balliauw406 views
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Maarten Balliauw180 views
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by Maarten Balliauw
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Maarten Balliauw326 views
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m... by Maarten Balliauw
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
Maarten Balliauw280 views
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se... by Maarten Balliauw
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
Maarten Balliauw290 views
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S... by Maarten Balliauw
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
Maarten Balliauw564 views
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search by Maarten Balliauw
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
Maarten Balliauw958 views
Approaches for application request throttling - Cloud Developer Days Poland by Maarten Balliauw
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
Maarten Balliauw1.1K views
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve... by Maarten Balliauw
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Maarten Balliauw1.1K views
Approaches for application request throttling - dotNetCologne by Maarten Balliauw
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
Maarten Balliauw246 views
CodeStock - Exploring .NET memory management - a trip down memory lane by Maarten Balliauw
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
Maarten Balliauw1.9K views
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain... by Maarten Balliauw
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Maarten Balliauw1.2K views
ConFoo Montreal - Approaches for application request throttling by Maarten Balliauw
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
Maarten Balliauw1.2K views
Microservices for building an IDE – The innards of JetBrains Rider - TechDays... by Maarten Balliauw
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Maarten Balliauw10.5K views
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory... by Maarten Balliauw
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
Maarten Balliauw1.1K views
DotNetFest - Let’s refresh our memory! Memory management in .NET by Maarten Balliauw
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
Maarten Balliauw480 views
VISUG - Approaches for application request throttling by Maarten Balliauw
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
Maarten Balliauw817 views

Recently uploaded

Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPoolShapeBlue
56 views10 slides
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
68 views13 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
218 views53 slides
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
49 views35 slides
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
121 views15 slides
Business Analyst Series 2023 - Week 4 Session 7 by
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
110 views31 slides

Recently uploaded(20)

Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue56 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue218 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
Business Analyst Series 2023 - Week 4 Session 7 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10110 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu287 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software373 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue120 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue172 views
DRBD Deep Dive - Philipp Reisner - LINBIT by ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue110 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue69 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE67 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue138 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue48 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue149 views

What is going on - Application diagnostics on Azure - TechDays Finland

  • 1. What is going on? Application Diagnostics on Azure Maarten Balliauw @maartenballiauw
  • 2. Agenda What is going on? Application Insights the service the developer side (SDK) Application Insights Analytics
  • 4. Log all the things! System.Diagnostics.Trace.TraceInformation( "Something happened"); System.Diagnostics.Trace.TraceWarning( "Error! " + ex.Message);
  • 5. And here’s a typical log... App.exe [12:13:03:985] Information: 0 : Customer address updated. App.exe [12:13:04:011] Error: 8 : System.NullReferenceException occurred. Value can not be null. App.exe [12:13:04:567] Information: 0 : Machine policy value 'Debug' is 0 App.exe [12:13:04:569] Verbose: 9 : ******* RunEngine ******* Action: ******* CommandLine: ********** App.exe [12:13:04:578] Information: 9 : Entered CheckResult() App.exe [12:13:04:689] Debug: 0 : Created. Req=0, Ret=8, Font: Req=null Does this help troubleshooting? Improve the application? Analyze trends?
  • 6. No.
  • 7. Log files suck. Just stupid string data Typical log file has no “context” Typical log file has no correlation Log files do not measure CPU, memory, I/O, ... How to get data off our machines? How to report/analyze?
  • 8. Log files suck. Just stupid string data Typical log file has no “context” Typical log file has no correlation Log files do not measure CPU, memory, I/O, ... How to get data off our machines? How to report/analyze? Semantic Logging (e.g. ETW, Serilog, ...)
  • 9. Log files suck. Just stupid string data Typical log file has no “context” Typical log file has no correlation Log files do not measure CPU, memory, I/O, ... How to get data off our machines? How to report/analyze? Windows Server tooling, NewRelic, PRTG, SNMP, ...
  • 10. Log files suck. Just stupid string data Typical log file has no “context” Typical log file has no correlation Log files do not measure CPU, memory, I/O, ... How to get data off our machines? How to report/analyze? Vendor tooling, NewRelic, PRTG, SNMP, ...
  • 11. Log files suck. Just stupid string data Typical log file has no “context” Typical log file has no correlation Log files do not measure CPU, memory, I/O, ... How to get data off our machines? How to report/analyze? Splunk, LogStash, Kibana, ...
  • 12. Analytics suck! Either use vendor tooling What with x-plat deployments? Either build it ourselves Lots of components, management overhead, ... All we wanted was logging and correlation...
  • 14. Application Insights ”Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms.”
  • 15. Application Insights Azure Service + Library/SDK Solves “where to store”, “how to ship”, “how to analyze” Enriches data with telemetry Correlates data (e.g. client + server + dependency/DB/...) Allows structured logging Allows rich querying, alerting Works for many, many platforms and languages Web, Windows, Xamarin, any application type really .NET, Java, JavaScript, Objective-C, PHP, Python, Ruby, ... Docker (host and container)
  • 18. Do I have to run on Azure? REST API to send data to Various tools and SDK’s to collect data specific to language/platform https://docs.microsoft.com/en-us/azure/application-insights/app-insights-platforms docker run -v /var/run/docker.sock:/docker.sock -d microsoft/applicationinsights ikey=000000-1111-2222-3333-444444444 IIS Docker host and containers
  • 20. Application Insights Let’s focus on this part for a bit.
  • 22. Input, processing, output DATA INGESTION Performance Counters Requests (both server/client side) Traces Exceptions Dependencies Custom Metrics & Events ... CAPABILITIES Monitoring Alerting Querying Exporting
  • 24. Application Insights Let’s focus on this part for a bit.
  • 25. Data being collected AUTOMATICALLY Performance Counters Requests (both server/client side) Traces Exceptions Dependencies Custom Metrics & Events ... ENRICH MANUALLY Better tracing (semantic logging!) Events Metrics Exceptions Telemetry pipeline ...
  • 26. Better tracing Don’t do stupid strings. System.Diagnostics.Trace is nice, but also not nice. Do semantic logging! Serilog, .NET Core logging have an Application Insights sink All else: write a sink or log directly to TelemetryClient.Current
  • 28. Events and Metrics Send custom events and metrics Name of event/metric + a value Events – help find how the application is used and can be optimized User resized column in a grid User logged in User clicked “Share” ... Metrics – help measuring quantifyable data # Items in shopping cart ...
  • 30. Exceptions Exceptions are unpleasant. How to make them more pleasant? Stack traces? MiniDump?
  • 32. Snapshots! (MiniDump) NuGet package MinidumpUploader.exe separate process which monitors snapshot requests SnapshotHolder_x64.exe creates a shadow process in 10-20ms, captures the minidump, returns it to MinidumpUploader.exe https://docs.microsoft.com/en-us/azure/application-insights/app-insights- snapshot-debugger
  • 33. Enriching telemetry Why? Enriching telemetry – adding properties to all data Obfuscating telemetry – GDPR, sensitive data, ... How? Directly adding data on TelemetryClient.Current Using the telemetry pipeline (middlewares on sending data to AI service) https://blog.maartenballiauw.be/post/2017/01/31/application-insights-telemetry-processors.html
  • 36. Application Insights Analytics Former MS-internal tool “Kusto” Near-realtime log ingestion and analysis Lets you run custom queries requests | where timestamp > ago(24h) | summarize count() by client_CountryOrRegion | top 10 by count_ | render piechart
  • 37. Queries over logs! Input dataset traces customEvents pageViews requests dependencies exceptions availabilityResults customMetrics performanceCounters browserTimings | Operators where count project join limit order | Renderer table chart (bar, pie, time, area, scatter) https://docs.microsoft.com/en-us/azure/application-insights/app-insights-analytics-reference
  • 38. Smart Detection Uses Application Insights Analytics data and searches for trends and anomalies Potential memleaks – memory increase Increase in specific exceptions Abnormal rise in failed requests ... Each detection comes with a query!
  • 40. What else is there? Other client types (mobile, Java, ...) Sampling our data (in portal) Do we need all data? Or just data that is representative enough? Release annotations Show a marker in the timeline when a release happens https://docs.microsoft.com/en-us/azure/application-insights/app-insights-annotations Profiler Preview that I can’t get to work, but should do profiling when interesting things happen https://docs.microsoft.com/en-us/azure/application-insights/app-insights-profiler
  • 42. Conclusion Logging sucks Application Insights the service – collect and ingest, analyze, different views the developer side (SDK) – enrich, customize, … Application Insights Analytics rich querying over all data base for automated insights/smart detection
  • 43. Thank you! Please do not forget to evaluate the session before you leave by using our Lollipolls! http://blog.maartenballiauw.be @maartenballiauw

Editor's Notes

  1. https://pixabay.com/p-960806/
  2. Highlight which customer? Awesome, stack trace for Exception, “Debug is 0” great! RunEngine entry very useful. What if we want to aggregate “Req” / “Ret”?
  3. https://pixabay.com/p-960806/
  4. Open portal.azure.com Show how to create Application Insights service, open an existing one Explain the main view there: List of all data sources we can look at on the left Main chart showing response time, page view load time, server requests, failed requests -> health! Sidenote: every chart can be pinned to a portal dashboard in case you want a nice live TV thingy Charts can be drilled into Drill into server response time and show some things Do the same with exceptions Show that if we look at an event or use search there is a view of all data points as well, including traces and logging etc. Display details and show properties of the event – who, where, what, … Open MusicStore and display a few things that have been added: 2 NuGet package references Show AppInsights package reference added, show Startup.cs where to configure (3 simple “Use...”) Show _Layout.cshtml, run app, show snippet Explain data comes from many locations! The NuGet package does a lot here, but not all! Open service, click “Getting Started” Explain there are a few entry points to collect all data
  5. https://pixabay.com/en/cat-animal-eyes-grey-view-views-351926/
  6. There are a few things AppInsights detects automagically for us! Open MyGet AppInsights Live Metrics Stream Connects to our running application and inspects the data that comes in real-time Metrics, health, server CPU and memory, ... We can filter per server as well Application Map Show Availability tests test the server-side Show client-side uses server-side components Click around, explain what we can see here Smart Detection Smart Detection tries to be proactive in detecting things that are “not normal” Alerts (open Alerts) Add alert, see on which metrics we can alert Show examples, show web tests feeding into alerts, ... Continuous export Mention what it does (blob storage) Show MyGet dashboard in PowerBI Quickly go over these because we will show them later on! Availability – explain web tests, explain these can be simple or actual tests created in VS that have multiple steps and checks Failures – we can see diagrams of exceptions vs. other metrics, as well as Exceptions Performance – mention profiler available only for Azure App Services Mention slowest pages client/server side, … Servers – Some server details, quickly go through this Browser – Browser stats, verify client-side code, page render times, find slowest rendering pages, ... Usage – Correlate technical side with user-side sessions, users, custom events (more later), ... Pretty cool for installing a NuGet package and adding five lines of code, no?
  7. https://pixabay.com/en/cat-animal-eyes-grey-view-views-351926/
  8. Open MusicStore and show Startup.cs, method Configure Mention we are configuring logging here, adding AppInsights with the Information level Open AccountController and show we are structured tracing the login event. Do a login, then open AppInsights and find the event “logged in …” Details reveal username property We get extra info And we can show the request in which this was logged and get more info
  9. Open MusicStore and explain tracking cart AlbumAdded metric Click in the site a bit. Perform a checkout. Complete.cshtml contains client-side tracking as well! Angular! Vue.js! Show metrics in portal, show events as well Show we can correlate Show funnels as well (explain we could add multiple metrics to look at e.g. a sign-up funnel)
  10. Open MusicStore and explain tracking cart AlbumAdded metric Click in the site a bit. Perform a checkout. Complete.cshtml contains client-side tracking as well! Angular! Vue.js! Show metrics in portal, show events as well Show we can correlate Show funnels as well (explain we could add multiple metrics to look at e.g. a sign-up funnel)
  11. Open MusicStore In Startup.cs, find Configure. We register two .NET middlewares here, show how they work and what they do. Explain this is something we can always do to enrich data. Telemetry pipeline that runs before shipping off telemetry is also interesting Find Startup.cs ConfigureServices where we add two telemetry processors One to filter out synthetic traffic Another one to filter out sensitive URLs Explain we can capture any type of metric, change the result, …
  12. https://pixabay.com/p-960806/
  13. Open portal.azure.com on MyGet AppInsights Demo AppInsights Analytics Show some of the sample queries, show the editor, show the various rendering types (auto complete in there) Run a few sample queries and find custom dimensions Show smart detection and the queries it generates
  14. Click the links and show what it is as “things to look at after this talk”