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.

Semantic logging with etw and slab from DCC 10/16

293 views

Published on

semantic logging with ETW and SLAB delivered at DCC 10/16

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Semantic logging with etw and slab from DCC 10/16

  1. 1. Semantic Logging with ETW and SLAB DESERT CODE CAMP OCT 2016
  2. 2. About Me Chris Holwerda – Architect and Developer for 20 years Blog with Slides: ChrisHolwerda.com Github: https://github.com/holwerda Twitter: @Cholwerda Speaker Rate: https://speakerrate.com/speakers/133491
  3. 3. Real World Example
  4. 4. I want something that…  Helps find issues in production  Gives me a view of the environment outside forces  Has no impact on performance  Don’t have to change application to turn on  Gives me a better way to use trace data
  5. 5. Semantic Tracing This is not a semantic trace This is a semantic trace
  6. 6. Semantic Trace Strategy  What things do you want to know?  Trace by Business Function, Method, Both  Don’t trace sensitive information
  7. 7. http://media.dcentertainment.com/sites/default/files/GalleryChar_1900x900_FL23_6-7_52ab8f8d847397.15032461.jpg
  8. 8. Event Tracing For Windows (ETW) Controller Provider Consumer Sessions Managed by OS On/Off, filtering Create Trace Entry Observe, access trace info
  9. 9. Binary File Event Tracing For Windows (ETW) Controller Provider Consumer Sessions Managed by OS Manifest File Installed
  10. 10. Binary File Event Tracing For Windows (ETW) Controller Provider Consumer Sessions Managed by OS Inline Manifest Starting with .NET 4.5 EventSource
  11. 11. ETW Channels IT Professionals ◦ Sent to Event Log and displayed in Event Viewer ◦ Admin Channel - admin should immediately know why the event was raised and what to do about it. Do not send non-actionable events here ◦ Operational Channel – targeted at high level monitoring tools and support staff. More detailed context and more frequent events Developers ◦ Debug Channel Expert Level Support ◦ Analytic Channel
  12. 12. PerfView
  13. 13. Demo – Run EXE to generate error, view in Perf View
  14. 14. EventSource
  15. 15. ETW Keywords, Tasks, OpCodes
  16. 16. Demo – EventSource Setup
  17. 17. Microsoft EventSource Build Time Validation of Event Attribute to WriteEvent position! Channels support (Admin, Operational, Analytical) New & Improved
  18. 18. Demo – Microsoft EventSource to Event Log
  19. 19. What about SLAB?
  20. 20. Semantic Logging Application Block •Available on Nuget •During development it allows output to familiar sinks •May have different SLAB Listeners with different filtering •In Process and Out of Process •Think of as a Consumer for processing application events
  21. 21. In Process vs Out of Process In Process • Capturing Application Events in the running Application • Pros • No extra service installation • Cons • Uses application resources Out of Proces • Capturing Application Events from external process • Pros • Doesn’t use application resources • Cons • Extra service installation
  22. 22. Sinks and Formatters Sinks ◦ Console ◦ Flat File ◦ Rolling Flat File ◦ SQL Database ◦ Windows Azure table storage Formatters ◦Xml ◦Json ◦Text
  23. 23. Demo – Install and Setup SLAB - InProc
  24. 24. Demo – Install and Setup SLAB – Out of Proc
  25. 25. Review  Semantic Logging = Logging that has meaning, not just strings  Treat event methods as a contract  Event methods ordinal position matter  Decorate methods with [NonEvent] when needed  Microsoft EventSource =+ Channel Support and Build Event Validation  Use SLAB + Service to host Out-Of-Process Consumer
  26. 26. Questions? Chris Holwerda – Architect and Developer for 20 years Blog with Slides: ChrisHolwerda.com Github: https://github.com/holwerda Twitter: @Cholwerda Speaker Rate: https://speakerrate.com/speakers/133491

×