Fluent Diagnostics Dec 11

313 views

Published on

This is a London Windows Azure Group Presentation for December 11 on Diagnostics in Windows Azure

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
313
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Centralised store in Storage
  • Fluent Diagnostics Dec 11

    1. 1. Windows Azure Diagnostics Andy Cross
    2. 2. 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
    3. 3. Example Log Usage• Application: – Error: Cannot save Order• Service: – Error: IO Exception• OS: – Error: Disk is full
    4. 4. 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
    5. 5. What you need• Hosted Service: – Compute capacity within Windows Azure• Storage Account: – Storage capacity within Windows Azure • Table • Blobs
    6. 6. 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
    7. 7. 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)
    8. 8. Configuration• Set options on types – Directories – Logs – Performance Counters• Storage Options – Some types allow a configurable destination• Transfer Period• Maximum Buffer Size
    9. 9. Transfer• Two distinct methods of transfer – Same underlying result• On Demand Transfer• Scheduled Transfer
    10. 10. Output formatsType Description DestinationTrace With Trace Listener Table WADLogsTableIIS Logs W3svc format BlobWindows Event Logs Table WADWindowsEventLogsTableWindows Performance Table WADPerformanceCountersTableCountersCustom Logs File based BlobCrash Dump BlobDiagnostic Infrastructure Metalog Table WADDiagnosticInfrastructureLogsTableLog
    11. 11. Methodologies• .net Tracing – Add Trace Listener – Configure WAD – View Result:
    12. 12. Logging per Instance• Logs on Instance Basis: – RoleInstance: • deployment(526).MultipleTraceSources.Host_IN_0 – DeploymentId.Role.Instance• Allows for per instance diagnosis
    13. 13. Configure Windows Azure Diagnostics• Setup Storage Account• Create Role Instance Diagnostics Manager• Get and update a configuration from Manager• Set Current Configuration
    14. 14. Example Code
    15. 15. Extended Code
    16. 16. Verbosity• Code is building XML WADCFG – Structure based on XML Schema• Not necessarily intuitive
    17. 17. Fluent Diagnostics• Attempts to curtail verbosity
    18. 18. 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
    19. 19. Change at Runtime• WAPPSCmdlets PowerShell cmdlets available at wappowershell.codeplex.com Example courtesy of michaelwasham.com
    20. 20. Diagnostics LifecycleScenario A Diagnostics A Diagnostics AOnStart Run Redeploy OnStop OnStart Run Diagnostics B
    21. 21. Diagnostics LifecycleScenario B Diagnostics A Diagnostics A Change OnStart Run Instance OnStart Run Count Diagnostics B
    22. 22. Diagnostics Lifecycle• Why do we see this behaviour? – Increase Instance Count – New Instance added by Fabric – Instance goes through OnStart!
    23. 23. Fluent Diagnostics• Allows you to use programmatic approach still – Uses Marker XML – Prevents further updates for a deployment
    24. 24. Diagnostics LifecycleFluent Diagnostics Scenario B Diagnostics A Marker File Added Diagnostics A Change OnStart Run Instance OnStart Run Count Diagnostics B
    25. 25. How to view Diagnostics• Raw in Tables, as shown before.• Cerebrata Azure Diagnostics Manager
    26. 26. Q&A• Many thanks.• Check out my blog: http://blog.bareweb.eu• Questions and Answers session

    ×