SlideShare una empresa de Scribd logo
1 de 19
State of the art logging

Milan Vukoje
vukoje@gmail.com
www.vukoje.net

October 23rd 2013
Intro
• Webcom
www.webcominc.com
•
•
• We are hiring!
Topics
•
•
•
•
•
•
•

What is tracing?
How to build it?
Logger as profiler
Logger design
Log analysis
Demo 1 – WEBCOM trace analysis GUI
Demo 2 – AOP logging in MVC with NLog and
Glimpse
What is tracing?
•
•
•
•

How to know what is production system doing?
Why not remote debugging?
Why not profiler?
What more?
• Debugging
• Profiling
• Notifications
• logs as data
So how to build it?
•
•
•
•

Custom solution?
System.Diagnostics.Trace?
IntelliTrace?
Log4Net?
• no support for CSV
• no support for dynamic file naming
• java port with a bit awkward code
• last release in 2006

• Nlog?
•
•
•
•

simple
good code
Plenty of features
side project by MS employee
Where to store logs?
• File system
• Accessibility
• Cleanup
• Replication
• Affecting speed
• Event log
• Database
• Cloud
• App memory
• web farms?
• session dependency
• Out of memory
Logger as profiler
•
•
•
•
•

When off – no impact
When on – trivial impact
Delay messages formatting!
Avoid DateTime.Now;
Use StopWatch.GetTimeStamp();
“using” vs. start/end logs

•
•
•
•

better for functions with multiple exit points
works good with exception control flow
less repeated work
better support for automatization
Logger design issues
•
•
•
•
•
•
•
•

Hide behind facade
Logger must not break
Should not be transactional
GUI for runtime configuration
Redundant logs
Editable logs
Logs size and cleanup
Avoid conditional tracing
Log levels
• Levels are not informative enough
• We need more meaningful API
• Trace (Low/High)
• debug and performance info
• Events (Info/Warn/Error/Fatal)
• durable info with different types
• suitable for monitoring
• much less than trace
Log entity data
•
•
•
•
•

Message/title + description
Log level
Timestamp
Exception call stack
Logger name - extracted from class name

• Additional data
• labels (categories)
• ticks
Log context data
• Event context
• App/Tenant/User/HttpRequest…
• Trace buffer
• Session buffer
• Trace call back and tag
AOP vs. manual logging
AOP vs. manual logging
• AOP
• easy
• too much logs
• no explanations, just method names
• Manual
• boring
• repetitive
• better control
• better meaning
• Combine them!
• Explain through logs
How to scope logs?
•
•
•
•
•
•
•

No scoping
Per app
Per server
Per tenant
Per user
Per user action
Configurable
Log analysis?
•
•
•
•
•

Log as data
Notepad(++)
Excel (csv)
LogParser studio
Integrated app tool
Demo 1 – WEBCOM trace
analysis GUI
Demo 2 – AOP logging in MVC
web app using NLog and
Glimpse
Thank you for your attention!

Any Questions?
www.vukoje.net
vukoje@gmail.com

Más contenido relacionado

La actualidad más candente

How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web APIAurimas Niekis
 
Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with SeleniumAll Things Open
 
Advantages of Rails Framework
Advantages of Rails FrameworkAdvantages of Rails Framework
Advantages of Rails FrameworkSathish Mariappan
 
Design & Prototype an API
Design & Prototype an APIDesign & Prototype an API
Design & Prototype an APIPostman
 
Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Laura Ojala
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEAJaap Brasser
 
Navigate around the edge with PowerShell
Navigate around the edge with PowerShellNavigate around the edge with PowerShell
Navigate around the edge with PowerShellJaap Brasser
 
Chat automation in a modern it environment
Chat automation in a modern it environmentChat automation in a modern it environment
Chat automation in a modern it environmentJaap Brasser
 
Hands on BDD with cucumber - Agile Goa Sept 2013
Hands on BDD with cucumber -  Agile Goa Sept 2013Hands on BDD with cucumber -  Agile Goa Sept 2013
Hands on BDD with cucumber - Agile Goa Sept 2013Sonik Chopra
 
From zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the guiFrom zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the guiJaap Brasser
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsKnoldus Inc.
 
Appium & Robot Framework
Appium & Robot FrameworkAppium & Robot Framework
Appium & Robot FrameworkFurkan Ertürk
 
Rails automatic test driven development
Rails automatic test driven developmentRails automatic test driven development
Rails automatic test driven developmenttyler4long
 

La actualidad más candente (20)

How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web API
 
Postman
PostmanPostman
Postman
 
Cucumber presenation
Cucumber presenationCucumber presenation
Cucumber presenation
 
Integration Testing with Selenium
Integration Testing with SeleniumIntegration Testing with Selenium
Integration Testing with Selenium
 
Advantages of Rails Framework
Advantages of Rails FrameworkAdvantages of Rails Framework
Advantages of Rails Framework
 
Design & Prototype an API
Design & Prototype an APIDesign & Prototype an API
Design & Prototype an API
 
Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019Robot Framework for beginners and what is new at 2019
Robot Framework for beginners and what is new at 2019
 
Secure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEASecure your servers in time with JIT and JEA
Secure your servers in time with JIT and JEA
 
Navigate around the edge with PowerShell
Navigate around the edge with PowerShellNavigate around the edge with PowerShell
Navigate around the edge with PowerShell
 
Chat automation in a modern it environment
Chat automation in a modern it environmentChat automation in a modern it environment
Chat automation in a modern it environment
 
Hands on BDD with cucumber - Agile Goa Sept 2013
Hands on BDD with cucumber -  Agile Goa Sept 2013Hands on BDD with cucumber -  Agile Goa Sept 2013
Hands on BDD with cucumber - Agile Goa Sept 2013
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
From zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the guiFrom zero to hero – learn how to automate from the gui
From zero to hero – learn how to automate from the gui
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
 
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan PeshovJavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
JavaCro'14 - Test Automation using RobotFramework Libraries – Stojan Peshov
 
Appium & Robot Framework
Appium & Robot FrameworkAppium & Robot Framework
Appium & Robot Framework
 
Vs java (1)
Vs java (1)Vs java (1)
Vs java (1)
 
Rails automatic test driven development
Rails automatic test driven developmentRails automatic test driven development
Rails automatic test driven development
 

Similar a State of the art logging

Logging Application Behavior to MongoDB
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDBRobert Stewart
 
ProcessFlow/IPA Differences
ProcessFlow/IPA DifferencesProcessFlow/IPA Differences
ProcessFlow/IPA DifferencesNogalis Inc
 
ReflectInsight - Let your application speak volume
ReflectInsight - Let your application speak volumeReflectInsight - Let your application speak volume
ReflectInsight - Let your application speak volumeCallon Campbell
 
The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!Michele Leroux Bustamante
 
Cashing in on logging and exception data
Cashing in on logging and exception dataCashing in on logging and exception data
Cashing in on logging and exception dataStackify
 
Technology behind-real-time-log-analytics
Technology behind-real-time-log-analytics Technology behind-real-time-log-analytics
Technology behind-real-time-log-analytics Data Science Thailand
 
Dreamforce 2017 - Advanced Logging Patterns with Platform Events
Dreamforce 2017 - Advanced Logging Patterns with Platform EventsDreamforce 2017 - Advanced Logging Patterns with Platform Events
Dreamforce 2017 - Advanced Logging Patterns with Platform Eventsandyinthecloud
 
Ni week 2018 LLAMA presentation
Ni week 2018 LLAMA presentationNi week 2018 LLAMA presentation
Ni week 2018 LLAMA presentationDMC, Inc.
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkTomas Doran
 
淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2Wen-Tien Chang
 
Agile startup company management and operation
Agile startup company management and operationAgile startup company management and operation
Agile startup company management and operationJiang Zhu
 
DataEngConf SF16 - Scalable and Reliable Logging at Pinterest
DataEngConf SF16 - Scalable and Reliable Logging at PinterestDataEngConf SF16 - Scalable and Reliable Logging at Pinterest
DataEngConf SF16 - Scalable and Reliable Logging at PinterestHakka Labs
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestKrishna Gade
 
Introduction to logging in django
Introduction to logging in djangoIntroduction to logging in django
Introduction to logging in djangoSiva Arunachalam
 
Analyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and TroubleshootingAnalyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and TroubleshootingMavenWire
 
Campus days 2013 - Instrumentation
Campus days 2013 - InstrumentationCampus days 2013 - Instrumentation
Campus days 2013 - InstrumentationAnders Lybecker
 
Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018Icinga
 

Similar a State of the art logging (20)

Logging Application Behavior to MongoDB
Logging Application Behavior to MongoDBLogging Application Behavior to MongoDB
Logging Application Behavior to MongoDB
 
Redundant devops
Redundant devopsRedundant devops
Redundant devops
 
ProcessFlow/IPA Differences
ProcessFlow/IPA DifferencesProcessFlow/IPA Differences
ProcessFlow/IPA Differences
 
ReflectInsight - Let your application speak volume
ReflectInsight - Let your application speak volumeReflectInsight - Let your application speak volume
ReflectInsight - Let your application speak volume
 
The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!The Ultimate Logging Architecture - You KNOW you want it!
The Ultimate Logging Architecture - You KNOW you want it!
 
Java Logging
Java LoggingJava Logging
Java Logging
 
Cashing in on logging and exception data
Cashing in on logging and exception dataCashing in on logging and exception data
Cashing in on logging and exception data
 
Technology behind-real-time-log-analytics
Technology behind-real-time-log-analytics Technology behind-real-time-log-analytics
Technology behind-real-time-log-analytics
 
Dreamforce 2017 - Advanced Logging Patterns with Platform Events
Dreamforce 2017 - Advanced Logging Patterns with Platform EventsDreamforce 2017 - Advanced Logging Patterns with Platform Events
Dreamforce 2017 - Advanced Logging Patterns with Platform Events
 
Ni week 2018 LLAMA presentation
Ni week 2018 LLAMA presentationNi week 2018 LLAMA presentation
Ni week 2018 LLAMA presentation
 
Messaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new frameworkMessaging, interoperability and log aggregation - a new framework
Messaging, interoperability and log aggregation - a new framework
 
淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2
 
Agile startup company management and operation
Agile startup company management and operationAgile startup company management and operation
Agile startup company management and operation
 
DataEngConf SF16 - Scalable and Reliable Logging at Pinterest
DataEngConf SF16 - Scalable and Reliable Logging at PinterestDataEngConf SF16 - Scalable and Reliable Logging at Pinterest
DataEngConf SF16 - Scalable and Reliable Logging at Pinterest
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at Pinterest
 
Introduction to logging in django
Introduction to logging in djangoIntroduction to logging in django
Introduction to logging in django
 
Analyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and TroubleshootingAnalyzing OTM Logs and Troubleshooting
Analyzing OTM Logs and Troubleshooting
 
Campus days 2013 - Instrumentation
Campus days 2013 - InstrumentationCampus days 2013 - Instrumentation
Campus days 2013 - Instrumentation
 
Supervise your Akka actors
Supervise your Akka actorsSupervise your Akka actors
Supervise your Akka actors
 
Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018Icinga Camp Berlin 2018 - What's evolving in icinga 2018
Icinga Camp Berlin 2018 - What's evolving in icinga 2018
 

Último

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 

Último (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 

State of the art logging

  • 1. State of the art logging Milan Vukoje vukoje@gmail.com www.vukoje.net October 23rd 2013
  • 3. Topics • • • • • • • What is tracing? How to build it? Logger as profiler Logger design Log analysis Demo 1 – WEBCOM trace analysis GUI Demo 2 – AOP logging in MVC with NLog and Glimpse
  • 4. What is tracing? • • • • How to know what is production system doing? Why not remote debugging? Why not profiler? What more? • Debugging • Profiling • Notifications • logs as data
  • 5. So how to build it? • • • • Custom solution? System.Diagnostics.Trace? IntelliTrace? Log4Net? • no support for CSV • no support for dynamic file naming • java port with a bit awkward code • last release in 2006 • Nlog? • • • • simple good code Plenty of features side project by MS employee
  • 6. Where to store logs? • File system • Accessibility • Cleanup • Replication • Affecting speed • Event log • Database • Cloud • App memory • web farms? • session dependency • Out of memory
  • 7. Logger as profiler • • • • • When off – no impact When on – trivial impact Delay messages formatting! Avoid DateTime.Now; Use StopWatch.GetTimeStamp();
  • 8. “using” vs. start/end logs • • • • better for functions with multiple exit points works good with exception control flow less repeated work better support for automatization
  • 9. Logger design issues • • • • • • • • Hide behind facade Logger must not break Should not be transactional GUI for runtime configuration Redundant logs Editable logs Logs size and cleanup Avoid conditional tracing
  • 10. Log levels • Levels are not informative enough • We need more meaningful API • Trace (Low/High) • debug and performance info • Events (Info/Warn/Error/Fatal) • durable info with different types • suitable for monitoring • much less than trace
  • 11. Log entity data • • • • • Message/title + description Log level Timestamp Exception call stack Logger name - extracted from class name • Additional data • labels (categories) • ticks
  • 12. Log context data • Event context • App/Tenant/User/HttpRequest… • Trace buffer • Session buffer • Trace call back and tag
  • 13. AOP vs. manual logging
  • 14. AOP vs. manual logging • AOP • easy • too much logs • no explanations, just method names • Manual • boring • repetitive • better control • better meaning • Combine them! • Explain through logs
  • 15. How to scope logs? • • • • • • • No scoping Per app Per server Per tenant Per user Per user action Configurable
  • 16. Log analysis? • • • • • Log as data Notepad(++) Excel (csv) LogParser studio Integrated app tool
  • 17. Demo 1 – WEBCOM trace analysis GUI
  • 18. Demo 2 – AOP logging in MVC web app using NLog and Glimpse
  • 19. Thank you for your attention! Any Questions? www.vukoje.net vukoje@gmail.com

Notas del editor

  1. EventLog – security issuesDatabase – overkill, can kill dbCloud - logentries
  2. When tracing is turned on it should not affect app performance or else we will get incorrect performance dataNever use DateTime.Now for profiling it is slower than StopWatch and not lighweight. StopWatch is more precise.
  3. hide behind the facade to lower dependency on external componentMust not breakreport errors using internal loggerNLog can turn on internal loggerwriting logs must not participate in ambient transactionsImportant to be possible to alter configuration at runtimeweb.config is not user friendly, and will restart appit should be possible to tracing on only for one userConsider redundant logging events to files instead of just DB in cases when DB is not accessible.Consider possibility to comment on EventLogs (mark as solved, enter case number etc…)
  4. negative events monitoring
  5. Trace buffer - last n Trace High entriesSession buffer - possibility for user to add custom data like last n visited urls
  6. LogParser studio - excellent for standard logs
  7. tracing from IPython scriptsLogAnalyzer console app for excel data analysismemory dumping with context and local variablesimpersonatelazy string evaluationvisual nesting of hierarchy datasample - see all db queries + slowest first + total time in dbreach filtering capabilitiesdownloading of raw csv data for later analysis
  8. controller actions logging wiht parametersAOP logging for repositoriesEF queries loggingTraceStep support