SlideShare a Scribd company logo
Un-Broken Logging
the foundation of software operability
TechnologUG, Leeds #techug
Thursday 22th October 2015
Matthew Skelton
Skelton Thatcher Consulting
@matthewpskelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
The way we use logging is (often) broken
How to make our logging more awesome
Why we should care
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Matthew Skelton
@matthewpskelton
#techug
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
@Operability
#operability
WhoOwnsMyOperability.com
confession:
I am a big fan of logging
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
exceptional situations
edge cases
metrics
analytics
‘audits’
…
@evanphx
execution trace
BAD STUFF
Logging is often unloved
1. Discontinuous
2. Errors only, or arbitrary
3. ‘Bolted on’
4. No aggregation & search
5. Specify severity up front
GOOD STUFF
How to make logging awesome
1. Continuous event IDs
2. Transaction tracing
3. Log aggregation & search tools
4. Design for logging
5. Decoupled severity
reduce time-to-detect
increase team engagement
increase configurability
enhance DevOps collaboration
#operability
Background
Autonomous weather station
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
MRI brain scan imaging
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Oil well monitoring
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Web-scale systems
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
logging makes things work
(event sourcing)
(structured logging)
(CQRS)
How is logging usually broken?
Logging is often unloved
1. Discontinuous
2. Errors only, or arbitrary
3. ‘Bolted on’
4. No aggregation & search
5. Specify severity up front
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
using logging mainly for errors
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
inconsistent use of logging
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
logging slows down the
software
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
logging ‘pollutes’ my precious
domain model
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
logging is just for those weird
Ops people
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
logging assumed to be free
($0) to implement
no budget for aggregating logs
across machines
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
log aggregation happens only
in Production
logs not available to Devs
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
fights over log severity levels
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
poor time synchronisation
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Some history, with pirates
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
weather, course, sightings,
latitude, longitude, …
(even when quiet)
JohnHarrison
Why log?
verification
traceability
accountability
charting the waters
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
- June 13th – Pirates!!!!
- Weds – Sharks!!!
- 19th Jun –BIGGER sharks!!!!
How to make logging awesome
How to make logging awesome
1. Continuous event IDs
2. Transaction tracing
3. Log aggregation & search tools
4. Design for logging
5. Decoupled severity
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Storage I/O
Worker Job
Queue
Upload
Continuous event IDs
How many distinct event
types (state transitions) in
your application?
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
represent distinct states
enum
Human-readable sets:
unique values, sparse, immutable
C#, Java, Python, node
(Ruby, PHP, …)
public enum EventID
{
// Badly-initialised logging data
NotSet = 0,
// An unrecognised event has occurred
UnexpectedError = 10000,
ApplicationStarted = 20000,
ApplicationShutdownNoticeReceived = 20001,
PageGenerationStarted = 30000,
PageGenerationCompleted = 30001,
MessageQueued = 40000,
MessagePeeked = 40001,
BasketItemAdded = 60001,
BasketItemRemoved = 60002,
CreditCardDetailsSubmitted = 70001,
// ...
}
Technical
Domain
public enum EventID
{
// Badly-initialised logging data
NotSet = 0,
// An unrecognised event has occurred
UnexpectedError = 10000,
ApplicationStarted = 20000,
ApplicationShutdownNoticeReceived = 20001,
PageGenerationStarted = 30000,
PageGenerationCompleted = 30001,
MessageQueued = 40000,
MessagePeeked = 40001,
BasketItemAdded = 60001,
BasketItemRemoved = 60002,
CreditCardDetailsSubmitted = 70001,
// ...
}
BasketItemAdded = 60001
BasketItemAdded = 60001
BasketItemRemoved = 60002
BasketItemAdded = 60001
BasketItemRemoved = 60002
represent distinct states
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
OrderSvc_BasketItemAdded
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Monolith to microservices:
debugger does not have the full view
Even with remote debugger, it’s
boring to attach and detach
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Storage I/O
Worker Job
Queue
Upload
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Transaction tracing
‘Unique-ish’ identifier for each request
Passed through downstream layers
Unique-ish ID
What about APM?
APM gives us application insight
BUT
How much do we learn?
Is APM available on the Dev box?
It’s not just ‘an Ops problem’!
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Helps us to understand how the
software really works
Small overhead is worth it
Configurable severity levels
Which log level is right?
DEBUG, INFO, WARNING,
ERROR, CRITICAL
Log level should *not* be fixed at
compile or build time!
Tune log levels
Tune log levels
Tune log levels
{
"eventmappings": {
"events": {
"event": [ {
"id": "CacheServiceStarted",
"severity": { "level": "Information" }
}, {
"id": "PageCachePurged",
"severity": { "level": "Debug" },
"state": { "enabled": false }
}, {
"id": "DatabaseConnectionTimeOut",
"severity": { "level": "Error" }
} ]
}
}
}
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Tune severity levels of specific
event IDs
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Event tracing
Use enumerations (or closest thing)
Technical and Domain event types
Distributed systems: debuggers less useful
Trace calls with ‘unique-enough’ handles
Tune log levels via config
Log aggregation & search tools
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Design for log aggregation
develop the software using log
aggregation as a first-class thing
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
stories for testing logging
BasketItemAdded
grep BasketItem
logging is (‘just’) another
system component
NTP
Dev and Ops collaboration*
* and testers too!
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
Where?
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
auditing
compliance
pre-emptive fault diagnosis
performance
metrics
…
Recap
Logging is often unloved
1. Discontinuous
2. Errors only, or arbitrary
3. ‘Bolted on’
4. No aggregation & search
5. Specify severity up front
How to make logging awesome
1. Continuous event IDs
2. Transaction tracing
3. Log aggregation & search tools
4. Design for logging
5. Decoupled severity
logging makes things work
“There is no thought behind
aspect-oriented programming”
MINDFUL LOGGING (?!)
database transaction logs
‘Structured Logging’
TW: “Adopt” (May 2015)
https://www.thoughtworks.com/radar/techniques/structured-logging
http://gregoryszorc.com/
.NET: http://serilog.net/
Java: https://github.com/fluent/fluent-logger-java
sanity
Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton
More
Ditch the Debugger and Use Log
Analysis Instead
Matthew Skelton
https://blog.logentries.com/2015/07/ditch-
the-debugger-and-use-log-analysis-instead/
More
Using Log Aggregation Across
Dev & Ops: The Pricing Advantage
Rob Thatcher
https://blog.logentries.com/2015/08/using-
log-aggregation-across-dev-ops-the-pricing-
advantage/
Evan Phoenix (@evanphx)
youtube.com/watch?v=Z-JskKlIBOA
Books
operabilitybook.comoperationalfeatures.com
Thank you
http://skeltonthatcher.com/
enquiries@skeltonthatcher.com
@SkeltonThatcher
+44 (0)20 8242 4103
@matthewpskelton

More Related Content

PDF
Miniature Guide to Operational Features - EdinDevOps - SkeltonThatcher
PDF
Un-broken Logging - Operability.io 2015 - Matthew Skelton
PDF
How to ditch the debugger and use logging instead - devwinter 2015
PDF
Why and how to test logging - DevOps Showcase North - Feb 2016 - Matthew Skelton
PDF
FIM and System Call Auditing at Scale in a Large Container Deployment
PDF
Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...
PDF
Taking AppSec to 11: AppSec Pipeline, DevOps and Making Things Better
PDF
Ephemeral DevOps: Adventures in Managing Short-Lived Systems
Miniature Guide to Operational Features - EdinDevOps - SkeltonThatcher
Un-broken Logging - Operability.io 2015 - Matthew Skelton
How to ditch the debugger and use logging instead - devwinter 2015
Why and how to test logging - DevOps Showcase North - Feb 2016 - Matthew Skelton
FIM and System Call Auditing at Scale in a Large Container Deployment
Transfer Learning: Repurposing ML Algorithms from Different Domains to Cloud ...
Taking AppSec to 11: AppSec Pipeline, DevOps and Making Things Better
Ephemeral DevOps: Adventures in Managing Short-Lived Systems

What's hot (20)

PPTX
Security War Games
PPTX
Rugged DevOps at Scale with Rich Mogull
PDF
Demystifying observability
PDF
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
PDF
OWASP AppSensor: Detecting Attacks in your Application
PDF
Building and Adopting a Cloud-Native Security Program
PPTX
Web and App Performance: Top Problems to avoid to keep you out of the News
PPTX
Responding to extended events in near real time
PPTX
OOP 2016 - Building Software That Eats The World
PPTX
Hacker Proof web app using Functional tests
PDF
Application Security from the Inside - OWASP
PPTX
Stephen Sadowski - Securely automating infrastructure in the cloud
PPTX
Security testautomation
PDF
Practical Chaos Engineering
ODP
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
PDF
DevOps and the Future of Enterprise Security
PDF
Automated Security Testing
PDF
BlueHat v18 || Improving security posture through increased agility with meas...
PDF
DevSecOps Fundamentals and the Scars to Prove it.
PDF
Cloud-native application monitoring powered by Riverbed and Elasticsearch
Security War Games
Rugged DevOps at Scale with Rich Mogull
Demystifying observability
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
OWASP AppSensor: Detecting Attacks in your Application
Building and Adopting a Cloud-Native Security Program
Web and App Performance: Top Problems to avoid to keep you out of the News
Responding to extended events in near real time
OOP 2016 - Building Software That Eats The World
Hacker Proof web app using Functional tests
Application Security from the Inside - OWASP
Stephen Sadowski - Securely automating infrastructure in the cloud
Security testautomation
Practical Chaos Engineering
Building an Open Source AppSec Pipeline - 2015 Texas Linux Fest
DevOps and the Future of Enterprise Security
Automated Security Testing
BlueHat v18 || Improving security posture through increased agility with meas...
DevSecOps Fundamentals and the Scars to Prove it.
Cloud-native application monitoring powered by Riverbed and Elasticsearch
Ad

Viewers also liked (18)

PDF
151110 - Global Environmental Management
DOCX
RESUME OF AJOY 2015 update april 2016
PDF
Wikipedia Diversity
PDF
Older than Humanity! - Gale Crater | Mars
PDF
Βασικές περίοδοι του αρχαίου ελληνικού κόσμου - Ιστορία του Αρχαίου Κόσμου Α'...
PPTX
Harmodius&Aristogeiton
PDF
Abstract IRAP
PDF
Co vše "umí" otázka
PDF
Introduction to Configuration Management
PDF
Essential applications management with Tiny Puppet
PDF
Apache con big data 2015 - Data Science from the trenches
PPTX
Roman triclinium presentation.
PDF
Skyeng Бесплатный вебинар "Как отдыхать на 15% дешевле со знанием английского...
PPT
Green and Healthy Buildings:Energy and IEQ Factors for High Performance Results
PPTX
Doing Business in Colombia 2015
PDF
BBVA: Global Risk Management - UBS European Conference 2015
PDF
Open Badges for Individuals and Organisations
PPTX
Roles and Responsibility of Community Health Nurse
151110 - Global Environmental Management
RESUME OF AJOY 2015 update april 2016
Wikipedia Diversity
Older than Humanity! - Gale Crater | Mars
Βασικές περίοδοι του αρχαίου ελληνικού κόσμου - Ιστορία του Αρχαίου Κόσμου Α'...
Harmodius&Aristogeiton
Abstract IRAP
Co vše "umí" otázka
Introduction to Configuration Management
Essential applications management with Tiny Puppet
Apache con big data 2015 - Data Science from the trenches
Roman triclinium presentation.
Skyeng Бесплатный вебинар "Как отдыхать на 15% дешевле со знанием английского...
Green and Healthy Buildings:Energy and IEQ Factors for High Performance Results
Doing Business in Colombia 2015
BBVA: Global Risk Management - UBS European Conference 2015
Open Badges for Individuals and Organisations
Roles and Responsibility of Community Health Nurse
Ad

Similar to Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton (20)

PDF
Un-broken logging - the foundation of software operability - Operability.io -...
PDF
Opslogger: Operations code (should be) production quality too!
PDF
Are logs a software engineer’s best friend? Yes -- follow these best practices
PDF
Centralized logging system using mongoDB
PDF
Conditional Logging Considered Harmful - Sean Reilly
PPTX
What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
PDF
PDF
Application Logging for large systems
PDF
Mining Development Knowledge to Understand and Support Software Logging Pract...
PDF
Developer Fundamentals - Logging
PPTX
Application logging for fun and profit
DOCX
Project Deimos
PPTX
Functional and non functional application logging
PDF
Docker Logging and analysing with Elastic Stack
PDF
Docker Logging and analysing with Elastic Stack - Jakub Hajek
PDF
Logging and ranting / Vytis Valentinavičius (Lamoda)
PDF
Farming logs to save the weekend
PPTX
Semantic Logging: Avoiding the Logging Chaos
PPTX
CodeFest 2014. Christopher Bennage — Semantic Logging. Avoiding the log chaos
PDF
SplunkApplicationLoggingBestPractices_Template_2.3.pdf
Un-broken logging - the foundation of software operability - Operability.io -...
Opslogger: Operations code (should be) production quality too!
Are logs a software engineer’s best friend? Yes -- follow these best practices
Centralized logging system using mongoDB
Conditional Logging Considered Harmful - Sean Reilly
What is going on? Application Diagnostics on Azure - Copenhagen .NET User Group
Application Logging for large systems
Mining Development Knowledge to Understand and Support Software Logging Pract...
Developer Fundamentals - Logging
Application logging for fun and profit
Project Deimos
Functional and non functional application logging
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Logging and ranting / Vytis Valentinavičius (Lamoda)
Farming logs to save the weekend
Semantic Logging: Avoiding the Logging Chaos
CodeFest 2014. Christopher Bennage — Semantic Logging. Avoiding the log chaos
SplunkApplicationLoggingBestPractices_Template_2.3.pdf

More from Skelton Thatcher Consulting Ltd (20)

PDF
Practical operability techniques for teams - Matthew Skelton - Agile in the C...
PDF
Practical operability techniques for distributed systems - Velocity EU 2017
PDF
Practical operability techniques for teams - IPEXPO 2017
PDF
Practical operability techniques for teams - webinar - Skelton Thatcher & Unicom
PDF
Teams and monoliths - Matthew Skelton - London DevOps June 2017
PDF
How and why to design your teams for modern software - JAX DevOps - April 2017
PDF
How and why to design your teams for modern software systems - Agile in Leeds...
PDF
Using Rancher for highly available deployment services with GoCD and TeamCity
PDF
How and why to design your Teams for modern Software Systems - Matthew Skelto...
PDF
Teams and monoliths - Matthew Skelton - Velocity EU 2016
PDF
Teams and monoliths - Matthew Skelton - Agile in the City Bristol 2016
PDF
Teams and monoliths - Matthew Skelton - LondonCD 2016
PDF
Continuous Delivery Anti-patterns from the wild - Matthew Skelton- IPEXPO Europe
PDF
Continuous Delivery antipatterns from the wild - Matthew Skelton - IPEXPO Man...
PDF
Continuous Delivery antipatterns from the wild - Matthew Skelton - Continuous...
PDF
How to bridge the Dev-DBA chasm - AgileYorkshire - Matthew Skelton
PDF
How to address operational aspects effectively with Agile practices - Matthew...
PDF
Long live the DevOps team - LeedsDevOps - 2015-10-22 - Matthew Skelton
PDF
Demystifying Operational Features for Product Owners - AgileCam - SkeltonThat...
PDF
Long live the DevOps team - Edinburgh 2015 - Skelton Thatcher
Practical operability techniques for teams - Matthew Skelton - Agile in the C...
Practical operability techniques for distributed systems - Velocity EU 2017
Practical operability techniques for teams - IPEXPO 2017
Practical operability techniques for teams - webinar - Skelton Thatcher & Unicom
Teams and monoliths - Matthew Skelton - London DevOps June 2017
How and why to design your teams for modern software - JAX DevOps - April 2017
How and why to design your teams for modern software systems - Agile in Leeds...
Using Rancher for highly available deployment services with GoCD and TeamCity
How and why to design your Teams for modern Software Systems - Matthew Skelto...
Teams and monoliths - Matthew Skelton - Velocity EU 2016
Teams and monoliths - Matthew Skelton - Agile in the City Bristol 2016
Teams and monoliths - Matthew Skelton - LondonCD 2016
Continuous Delivery Anti-patterns from the wild - Matthew Skelton- IPEXPO Europe
Continuous Delivery antipatterns from the wild - Matthew Skelton - IPEXPO Man...
Continuous Delivery antipatterns from the wild - Matthew Skelton - Continuous...
How to bridge the Dev-DBA chasm - AgileYorkshire - Matthew Skelton
How to address operational aspects effectively with Agile practices - Matthew...
Long live the DevOps team - LeedsDevOps - 2015-10-22 - Matthew Skelton
Demystifying Operational Features for Product Owners - AgileCam - SkeltonThat...
Long live the DevOps team - Edinburgh 2015 - Skelton Thatcher

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
AI in Product Development-omnex systems
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Introduction to Artificial Intelligence
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Nekopoi APK 2025 free lastest update
PPT
Introduction Database Management System for Course Database
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Operating system designcfffgfgggggggvggggggggg
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Navsoft: AI-Powered Business Solutions & Custom Software Development
ManageIQ - Sprint 268 Review - Slide Deck
AI in Product Development-omnex systems
Odoo POS Development Services by CandidRoot Solutions
Odoo Companies in India – Driving Business Transformation.pdf
L1 - Introduction to python Backend.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Introduction to Artificial Intelligence
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Nekopoi APK 2025 free lastest update
Introduction Database Management System for Course Database
Upgrade and Innovation Strategies for SAP ERP Customers
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
ai tools demonstartion for schools and inter college
Operating system designcfffgfgggggggvggggggggg

Un-broken Logging - TechnologyUG - Leeds - Matthew Skelton