Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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.TraceWarnin...
And here’s a typical log...
App.exe [12:13:03:985] Information: 0 : Customer address updated.
App.exe [12:13:04:011] Error...
No.
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do...
Log files suck.
Just stupid string data
Typical log file has no “context”
Typical log file has no correlation
Log files do...
Analytics suck!
Either use vendor tooling
What with x-plat deployments?
Either build it ourselves
Lots of components, mana...
Application Insights
Application Insights
”Application Insights is an extensible Application Performance
Management (APM) service for web devel...
Application Insights
Azure Service + Library/SDK
Solves “where to store”, “how to ship”, “how to analyze”
Enriches data wi...
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
...
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
Depende...
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
...
Better tracing
Don’t do stupid strings.
System.Diagnostics.Trace is nice, but also not nice.
Do semantic logging!
Serilog,...
Better tracing
DEMO
Events and Metrics
Send custom events and metrics
Name of event/metric + a value
Events – help find how the application is...
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_...
Enriching telemetry
Why?
Enriching telemetry – adding properties to all data
Obfuscating telemetry – GDPR, sensitive data,...
Enriching telemetry
DEMO
Application Insights
Analytics
Application Insights Analytics
Former MS-internal tool “Kusto”
Near-realtime log ingestion and analysis
Lets you run custo...
Queries over logs!
Input dataset
traces
customEvents
pageViews
requests
dependencies
exceptions
availabilityResults
custom...
Smart Detection
Uses Application Insights Analytics data and searches for trends and anomalies
Potential memleaks – memory...
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...
Conclusion
Conclusion
Logging sucks
Application Insights
the service – collect and ingest, analyze, different views
the developer sid...
Thank you!
Please do not forget to evaluate the
session before you leave by using our
Lollipolls!
http://blog.maartenballi...
Upcoming SlideShare
Loading in …5
×

of

What is going on - Application diagnostics on Azure - TechDays Finland Slide 1 What is going on - Application diagnostics on Azure - TechDays Finland Slide 2 What is going on - Application diagnostics on Azure - TechDays Finland Slide 3 What is going on - Application diagnostics on Azure - TechDays Finland Slide 4 What is going on - Application diagnostics on Azure - TechDays Finland Slide 5 What is going on - Application diagnostics on Azure - TechDays Finland Slide 6 What is going on - Application diagnostics on Azure - TechDays Finland Slide 7 What is going on - Application diagnostics on Azure - TechDays Finland Slide 8 What is going on - Application diagnostics on Azure - TechDays Finland Slide 9 What is going on - Application diagnostics on Azure - TechDays Finland Slide 10 What is going on - Application diagnostics on Azure - TechDays Finland Slide 11 What is going on - Application diagnostics on Azure - TechDays Finland Slide 12 What is going on - Application diagnostics on Azure - TechDays Finland Slide 13 What is going on - Application diagnostics on Azure - TechDays Finland Slide 14 What is going on - Application diagnostics on Azure - TechDays Finland Slide 15 What is going on - Application diagnostics on Azure - TechDays Finland Slide 16 What is going on - Application diagnostics on Azure - TechDays Finland Slide 17 What is going on - Application diagnostics on Azure - TechDays Finland Slide 18 What is going on - Application diagnostics on Azure - TechDays Finland Slide 19 What is going on - Application diagnostics on Azure - TechDays Finland Slide 20 What is going on - Application diagnostics on Azure - TechDays Finland Slide 21 What is going on - Application diagnostics on Azure - TechDays Finland Slide 22 What is going on - Application diagnostics on Azure - TechDays Finland Slide 23 What is going on - Application diagnostics on Azure - TechDays Finland Slide 24 What is going on - Application diagnostics on Azure - TechDays Finland Slide 25 What is going on - Application diagnostics on Azure - TechDays Finland Slide 26 What is going on - Application diagnostics on Azure - TechDays Finland Slide 27 What is going on - Application diagnostics on Azure - TechDays Finland Slide 28 What is going on - Application diagnostics on Azure - TechDays Finland Slide 29 What is going on - Application diagnostics on Azure - TechDays Finland Slide 30 What is going on - Application diagnostics on Azure - TechDays Finland Slide 31 What is going on - Application diagnostics on Azure - TechDays Finland Slide 32 What is going on - Application diagnostics on Azure - TechDays Finland Slide 33 What is going on - Application diagnostics on Azure - TechDays Finland Slide 34 What is going on - Application diagnostics on Azure - TechDays Finland Slide 35 What is going on - Application diagnostics on Azure - TechDays Finland Slide 36 What is going on - Application diagnostics on Azure - TechDays Finland Slide 37 What is going on - Application diagnostics on Azure - TechDays Finland Slide 38 What is going on - Application diagnostics on Azure - TechDays Finland Slide 39 What is going on - Application diagnostics on Azure - TechDays Finland Slide 40 What is going on - Application diagnostics on Azure - TechDays Finland Slide 41 What is going on - Application diagnostics on Azure - TechDays Finland Slide 42 What is going on - Application diagnostics on Azure - TechDays Finland Slide 43
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

1 Like

Share

Download to read offline

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

Download to read offline

We all like building and deploying cloud applications. But what happens once that’s done? How do we know if our application behaves like we expect it to behave? Of course, logging! But how do we get that data off of our machines? How do we sift through a bunch of seemingly meaningless diagnostics? In this session, we’ll look at how we can keep track of our Azure application using structured logging, AppInsights and AppInsights analytics to make all that data more meaningful.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

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

  1. 1. What is going on? Application Diagnostics on Azure Maarten Balliauw @maartenballiauw
  2. 2. Agenda What is going on? Application Insights the service the developer side (SDK) Application Insights Analytics
  3. 3. What is going on?
  4. 4. Log all the things! System.Diagnostics.Trace.TraceInformation( "Something happened"); System.Diagnostics.Trace.TraceWarning( "Error! " + ex.Message);
  5. 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. 6. No.
  7. 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. 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. 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. 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. 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. 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...
  13. 13. Application Insights
  14. 14. Application Insights ”Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms.”
  15. 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)
  16. 16. Application Insights
  17. 17. Getting Started DEMO
  18. 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
  19. 19. Application Insights – the service
  20. 20. Application Insights Let’s focus on this part for a bit.
  21. 21. Monitoring, alerting, exporting DEMO
  22. 22. Input, processing, output DATA INGESTION Performance Counters Requests (both server/client side) Traces Exceptions Dependencies Custom Metrics & Events ... CAPABILITIES Monitoring Alerting Querying Exporting
  23. 23. Application Insights – the developer side
  24. 24. Application Insights Let’s focus on this part for a bit.
  25. 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. 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
  27. 27. Better tracing DEMO
  28. 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 ...
  29. 29. Events and Metrics DEMO
  30. 30. Exceptions Exceptions are unpleasant. How to make them more pleasant? Stack traces? MiniDump?
  31. 31. Exceptions DEMO
  32. 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. 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
  34. 34. Enriching telemetry DEMO
  35. 35. Application Insights Analytics
  36. 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. 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. 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!
  39. 39. Application Insights Analytics DEMO
  40. 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
  41. 41. Conclusion
  42. 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. 43. Thank you! Please do not forget to evaluate the session before you leave by using our Lollipolls! http://blog.maartenballiauw.be @maartenballiauw
  • oliverlp

    Oct. 24, 2018

We all like building and deploying cloud applications. But what happens once that’s done? How do we know if our application behaves like we expect it to behave? Of course, logging! But how do we get that data off of our machines? How do we sift through a bunch of seemingly meaningless diagnostics? In this session, we’ll look at how we can keep track of our Azure application using structured logging, AppInsights and AppInsights analytics to make all that data more meaningful.

Views

Total views

690

On Slideshare

0

From embeds

0

Number of embeds

3

Actions

Downloads

7

Shares

0

Comments

0

Likes

1

×