SlideShare una empresa de Scribd logo
1 de 27
Windows Azure Diagnostics

        Andy Cross
Overview
• Diagnostics in Windows Azure
  – Application Level
  – Service Level
  – Operating System Level

               • Things your application chooses to log
      App

               • Things logged by what runs your application
     Service

               • Things logged by OS container
       OS
Example Log Usage
• Application:
  – Error: Cannot save Order
• Service:
  – Error: IO Exception
• OS:
  – Error: Disk is full
What’s special?
• Familiar diagnostic challenges
  – Already solved on premises

• Massively scalable
  – No request affinity
  – Unpredictable application topology

• Where do the logs go?!
  – Centralised Logging approach
What you need
• Hosted Service:
  – Compute capacity within Windows Azure


• Storage Account:
  – Storage capacity within Windows Azure
     • Table
     • Blobs
Windows Azure Diagnostics

                                              My Azure
   Hosted Service                               App


                                                         Worker
        Role                      Web Role
                                                          Role


      Instances            IN_0              IN_1         IN_0

• Each Role
   – Configurable Diagnostics Monitor
   – Each Instance inherits configuration
Example Trace Points
• Application
   – .net application Tracing
   – custom
       • Files written via nLog, log4net etc
   – Windows Event Log
• Service
   – IIS Logs
   – IIS Failed Request Logs
   – Azure Diagnostics Infrastructure Logs
       • Metalog
   – Performance Counters
• Operating System
   – Windows Event Log
   – Custom (any known file log)
Configuration
• Set options on types
  – Directories
  – Logs
  – Performance Counters

• Storage Options
  – Some types allow a configurable destination

• Transfer Period
• Maximum Buffer Size
Transfer
• Two distinct methods of transfer
  – Same underlying result


• On Demand Transfer

• Scheduled Transfer
Output formats

Type                        Description           Destination
Trace                       With Trace Listener   Table WADLogsTable
IIS Logs                    W3svc format          Blob
Windows Event Logs                                Table WADWindowsEventLogsTable
Windows Performance                               Table WADPerformanceCountersTable
Counters
Custom Logs                 File based            Blob
Crash Dump                                        Blob
Diagnostic Infrastructure   Metalog               Table WADDiagnosticInfrastructureLogsTable
Log
Methodologies
• .net Tracing
  – Add Trace Listener




  – Configure WAD
  – View Result:
Logging per Instance
• Logs on Instance Basis:
  – RoleInstance:
     • deployment(526).MultipleTraceSources.Host_IN_0
  – DeploymentId.Role.Instance


• Allows for per instance diagnosis
Configure Windows Azure Diagnostics

• Setup Storage Account

• Create Role Instance Diagnostics Manager

• Get and update a configuration from Manager

• Set Current Configuration
Example Code
Extended Code
Verbosity
• Code is building XML WADCFG
  – Structure based on XML Schema


• Not necessarily intuitive
Fluent Diagnostics
• Attempts to curtail verbosity
Windows Azure Role Lifecycle
• Each Role runs
  – OnStart
  – Run
  – OnStop

• Setup Diagnostics OnStart – always correct for
  that role
• But if you change the config, another OnStart
  will undo your changes
Change at Runtime
• WAPPSCmdlets




            PowerShell cmdlets available at wappowershell.codeplex.com
                              Example courtesy of michaelwasham.com
Diagnostics Lifecycle
Scenario A

          Diagnostics A                                          Diagnostics A




OnStart                   Run   Redeploy          OnStop   OnStart               Run



                                       Diagnostics B
Diagnostics Lifecycle
Scenario B
           Diagnostics A                                   Diagnostics A




                                   Change
 OnStart                   Run    Instance       OnStart                   Run
                                    Count


                                 Diagnostics B
Diagnostics Lifecycle
• Why do we see this behaviour?
  – Increase Instance Count
  – New Instance added by Fabric
  – Instance goes through OnStart!
Fluent Diagnostics
• Allows you to use programmatic approach still
  – Uses Marker XML
  – Prevents further updates for a deployment
Diagnostics Lifecycle
Fluent Diagnostics Scenario B
           Diagnostics A         Marker File Added                        Diagnostics A




                                         Change
 OnStart                   Run          Instance                OnStart                   Run
                                          Count


                                                     Diagnostics B
How to view Diagnostics
• Raw in Tables, as shown before.
• Cerebrata Azure Diagnostics Manager
Q&A
• Many thanks.
• Check out my blog:
     http://blog.bareweb.eu

• Questions and Answers session

Más contenido relacionado

Destacado

Decreto 278-2013 Un golpe fiscal-Tributario
Decreto 278-2013 Un golpe fiscal-TributarioDecreto 278-2013 Un golpe fiscal-Tributario
Decreto 278-2013 Un golpe fiscal-TributarioErlin Rivera
 
Vergelijking Gentle Teaching, Methode Heijkoop
Vergelijking Gentle Teaching, Methode HeijkoopVergelijking Gentle Teaching, Methode Heijkoop
Vergelijking Gentle Teaching, Methode HeijkoopMethode Heijkoop
 
Service Management Dec 11
Service Management Dec 11Service Management Dec 11
Service Management Dec 11clarendonint
 

Destacado (6)

Decreto 278-2013 Un golpe fiscal-Tributario
Decreto 278-2013 Un golpe fiscal-TributarioDecreto 278-2013 Un golpe fiscal-Tributario
Decreto 278-2013 Un golpe fiscal-Tributario
 
Vergelijking Gentle Teaching, Methode Heijkoop
Vergelijking Gentle Teaching, Methode HeijkoopVergelijking Gentle Teaching, Methode Heijkoop
Vergelijking Gentle Teaching, Methode Heijkoop
 
Service Management Dec 11
Service Management Dec 11Service Management Dec 11
Service Management Dec 11
 
 
B&S Secret Santa
B&S Secret SantaB&S Secret Santa
B&S Secret Santa
 
วิชาการท่องเที่ยว(ต่างประเทศ)
วิชาการท่องเที่ยว(ต่างประเทศ)วิชาการท่องเที่ยว(ต่างประเทศ)
วิชาการท่องเที่ยว(ต่างประเทศ)
 

Similar a Fluent Diagnostics Dec 11

Agile infrastructure
Agile infrastructureAgile infrastructure
Agile infrastructureTarun Rajput
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdfSpiritsoftsTraining
 
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵Amazon Web Services Korea
 
20110812 CyberTAN presentation
20110812 CyberTAN presentation20110812 CyberTAN presentation
20110812 CyberTAN presentationRichard Hsu
 
CCI2018 - Benchmarking in the cloud
CCI2018 - Benchmarking in the cloudCCI2018 - Benchmarking in the cloud
CCI2018 - Benchmarking in the cloudwalk2talk srl
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOpsEklove Mohan
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environmentMatanGoren
 
Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabricAbhishek Sur
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
UWP apps development - Part 2
UWP apps development - Part 2UWP apps development - Part 2
UWP apps development - Part 2Jiri Danihelka
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Ryan Cuprak
 
Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Amazon Web Services
 
Practical maven-slides 2
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2Will Iverson
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)Michael Collier
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014Amazon Web Services
 
Webinar: Deployment Best Practices
Webinar: Deployment Best PracticesWebinar: Deployment Best Practices
Webinar: Deployment Best PracticesMongoDB
 
Jose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release PipelineJose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release PipelineJose Luis Soria
 

Similar a Fluent Diagnostics Dec 11 (20)

Agile infrastructure
Agile infrastructureAgile infrastructure
Agile infrastructure
 
Testing Tools Online Training.pdf
Testing Tools Online Training.pdfTesting Tools Online Training.pdf
Testing Tools Online Training.pdf
 
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 
20110812 CyberTAN presentation
20110812 CyberTAN presentation20110812 CyberTAN presentation
20110812 CyberTAN presentation
 
CCI2018 - Benchmarking in the cloud
CCI2018 - Benchmarking in the cloudCCI2018 - Benchmarking in the cloud
CCI2018 - Benchmarking in the cloud
 
IaaS azure_vs_amazon
IaaS azure_vs_amazonIaaS azure_vs_amazon
IaaS azure_vs_amazon
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
MyHeritage - QA Automations in a Continuous Deployment environment
MyHeritage -  QA Automations in a Continuous Deployment environmentMyHeritage -  QA Automations in a Continuous Deployment environment
MyHeritage - QA Automations in a Continuous Deployment environment
 
Azure servicefabric
Azure servicefabricAzure servicefabric
Azure servicefabric
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
UWP apps development - Part 2
UWP apps development - Part 2UWP apps development - Part 2
UWP apps development - Part 2
 
Windows Azure introduction
Windows Azure introductionWindows Azure introduction
Windows Azure introduction
 
Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
 
Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012Benchmarking and Performance on AWS - AWS India Summit 2012
Benchmarking and Performance on AWS - AWS India Summit 2012
 
Practical maven-slides 2
Practical maven-slides 2Practical maven-slides 2
Practical maven-slides 2
 
.NET Debugging Workshop
.NET Debugging Workshop.NET Debugging Workshop
.NET Debugging Workshop
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
 
Webinar: Deployment Best Practices
Webinar: Deployment Best PracticesWebinar: Deployment Best Practices
Webinar: Deployment Best Practices
 
Jose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release PipelineJose Luis Soria - XP2014 - Designing a Release Pipeline
Jose Luis Soria - XP2014 - Designing a Release Pipeline
 

Fluent Diagnostics Dec 11

  • 1.
  • 3. Overview • Diagnostics in Windows Azure – Application Level – Service Level – Operating System Level • Things your application chooses to log App • Things logged by what runs your application Service • Things logged by OS container OS
  • 4. Example Log Usage • Application: – Error: Cannot save Order • Service: – Error: IO Exception • OS: – Error: Disk is full
  • 5. What’s special? • Familiar diagnostic challenges – Already solved on premises • Massively scalable – No request affinity – Unpredictable application topology • Where do the logs go?! – Centralised Logging approach
  • 6. What you need • Hosted Service: – Compute capacity within Windows Azure • Storage Account: – Storage capacity within Windows Azure • Table • Blobs
  • 7. Windows Azure Diagnostics My Azure Hosted Service App Worker Role Web Role Role Instances IN_0 IN_1 IN_0 • Each Role – Configurable Diagnostics Monitor – Each Instance inherits configuration
  • 8. Example Trace Points • Application – .net application Tracing – custom • Files written via nLog, log4net etc – Windows Event Log • Service – IIS Logs – IIS Failed Request Logs – Azure Diagnostics Infrastructure Logs • Metalog – Performance Counters • Operating System – Windows Event Log – Custom (any known file log)
  • 9. Configuration • Set options on types – Directories – Logs – Performance Counters • Storage Options – Some types allow a configurable destination • Transfer Period • Maximum Buffer Size
  • 10. Transfer • Two distinct methods of transfer – Same underlying result • On Demand Transfer • Scheduled Transfer
  • 11. Output formats Type Description Destination Trace With Trace Listener Table WADLogsTable IIS Logs W3svc format Blob Windows Event Logs Table WADWindowsEventLogsTable Windows Performance Table WADPerformanceCountersTable Counters Custom Logs File based Blob Crash Dump Blob Diagnostic Infrastructure Metalog Table WADDiagnosticInfrastructureLogsTable Log
  • 12. Methodologies • .net Tracing – Add Trace Listener – Configure WAD – View Result:
  • 13. Logging per Instance • Logs on Instance Basis: – RoleInstance: • deployment(526).MultipleTraceSources.Host_IN_0 – DeploymentId.Role.Instance • Allows for per instance diagnosis
  • 14. Configure Windows Azure Diagnostics • Setup Storage Account • Create Role Instance Diagnostics Manager • Get and update a configuration from Manager • Set Current Configuration
  • 17. Verbosity • Code is building XML WADCFG – Structure based on XML Schema • Not necessarily intuitive
  • 18. Fluent Diagnostics • Attempts to curtail verbosity
  • 19. Windows Azure Role Lifecycle • Each Role runs – OnStart – Run – OnStop • Setup Diagnostics OnStart – always correct for that role • But if you change the config, another OnStart will undo your changes
  • 20. Change at Runtime • WAPPSCmdlets PowerShell cmdlets available at wappowershell.codeplex.com Example courtesy of michaelwasham.com
  • 21. Diagnostics Lifecycle Scenario A Diagnostics A Diagnostics A OnStart Run Redeploy OnStop OnStart Run Diagnostics B
  • 22. Diagnostics Lifecycle Scenario B Diagnostics A Diagnostics A Change OnStart Run Instance OnStart Run Count Diagnostics B
  • 23. Diagnostics Lifecycle • Why do we see this behaviour? – Increase Instance Count – New Instance added by Fabric – Instance goes through OnStart!
  • 24. Fluent Diagnostics • Allows you to use programmatic approach still – Uses Marker XML – Prevents further updates for a deployment
  • 25. Diagnostics Lifecycle Fluent Diagnostics Scenario B Diagnostics A Marker File Added Diagnostics A Change OnStart Run Instance OnStart Run Count Diagnostics B
  • 26. How to view Diagnostics • Raw in Tables, as shown before. • Cerebrata Azure Diagnostics Manager
  • 27. Q&A • Many thanks. • Check out my blog: http://blog.bareweb.eu • Questions and Answers session

Notas del editor

  1. Centralised store in Storage