SlideShare a Scribd company logo
Opslogger:Operationscode
(shouldbe)production
qualitytoo!
AboutMe
Sean Reilly
@seanjreilly
FullDisclosure
Most of this is true for all
operations infrastructure.
FullDisclosurePart2
I’m not in ops. I’m a dev.
HowAnAgileFeatureIsDeveloped
• A customer need is identified
• Design with a customer representative
• A feature story is written
• Prioritised
HowAnAgileFeatureIsDeveloped
• YAGNI check
• Tested
• Developed
• Refactored
HowAnAgileFeatureIsDeveloped
• Demoed to customer representative
• Marked as “done”
• Deployed to production
• Feedback is gathered
HowAnAgileFeatureIsDeveloped
(and sometimes)
• Updated or tweaked
• Feature is decommissioned
Loggingisn’ttreatedthis
way.Whynot?
Whathappensinstead
• Feature stories aren’t written at all
• They aren’t tied to a customer
• They aren’t prioritised
• “Do something with logging”
Whathappensinstead
• Not subjected to a YAGNI check
• Rarely tested
• Rarely refactored
• Often broken by refactoring!
Whathappensinstead
• Rarely demoed
• Feedback gathered rarely and haphazardly
• Rarely updated
• Almost never decommissioned properly
“Thatsoundslikearecipe
fordisaster”
ARecipeForDisaster
• Logging operations doesn’t want
• Missing logging operations does want
• Not capturing the right information
• Not making the system more reliable
• Not making the system easier to manage
CopingMechanisms
• Operations tries to:
• Sift through what’s there
• Do detective work to figure out what’s there
• Add some scripts
• Or re-engineer something
ARecipeForDisaster
And sometimes, just actual disasters
“ThrowitovertheWall”
• This situation is toxic
• Operations puts up “release gates”
• Devs resent operations
• Spiral of mistrust, or worse
WhatWorksBetter?
• Collaboration, not negotiation
• Developers want this too
• Some just don’t know it yet
ButHow?
TreatOperationsasUsers
• And not just any users, either
• Possibly the most important users
• The operations team are the users that
turnyourapplicationon
MorethanJustPrioritisation
• This should be about story acceptance
• Writing the stories in the first place
• Testing the stories
• Demoing the stories
• Deciding the stories are done
TheBiggestDifference?
Onestorybecomesmanystories
Before
• “Add logging”
After
• “Log on application startup”
• “Log on an uncaught exception”
• “Log when an import job completes”
ARealExampleStory
“As operations, I want a log entry to be
written when the application starts, so that
I can determine how often this happens over
a period of time”
Very,Very,Different
This process changed how I thought
about logging entirely
Whyislogginglousy?
Weusetools…
• Designed for the wrong customer
• Designed with the wrong features
• Designed to do the wrong things
Weusethewrongtools
TheWrongFeatures
• Conditional Logging
• Log rotation
• Configurable destinations
• Dozens of output formats
TheWrongFeatures
• ConditionalLogging
• Log rotation
• Configurable destinations
• Dozens of output formats
Ifyouhaveaproductionproblem,
turningonDEBUGloggingwon’thelp.
TheWrongFeatures
• Conditional Logging
• Logrotation
• Configurable destinations
• Dozens of output formats
TheWrongFeatures
• Conditional Logging
• Log rotation
• Configurabledestinations
• Dozens of output formats
TheWrongFeatures
• Conditional Logging
• Log rotation
• Configurable destinations
• Dozensofoutputformats
Notdeveloperfriendlyeither
• Separate configuration
• Not IoC/DI friendly
• Not test friendly
• Not refactor friendly
FeaturesWeActuallyWant
• Provide a list of log messages
• Handle stack traces properly
• Make it easy to parse log messages
• Make it easy to search for log messages
WhatWeBuilt:The
Opsloggerlibrary
https://www.github.com/equalexperts/opslogger/
EnumBasedLogging
EnumBasedLogging
• An enum of all log messages
EnumBasedLogging
• An enum of all log messages
• Each enum value has a unique code
EnumBasedLogging
• An enum of all log messages
• Each enum value has a unique code
• Each enum value has a format string
EnumBasedLogging
• An enum of all log messages
• Each enum value has a unique code
• Each enum value has a format string
• To log: provide an enum value and format
string arguments
TheOutput
2014-04-30T17:46:49Z,-,GDS-0000,Published	42	records	
2014-04-30T17:48:18Z,-,GDS-0000,Published	64	records	
2014-04-30T17:52:45Z,-,GDS-0006,Config	file	foo.conf	not	
found
CodeSample
OpenSource
TheLibrary
• Open source (Apache2)
• Opinionated
• Simple output, easy to read, easy to parse
• Small, simple, no transitive dependencies
• Java 8 required
TestabilityFeatures
• Designed for testability
• Special test double
• Mock framework agnostic
• Contract tests for your enums
• OpsLogger instances always use injection
UniqueFeatures
• Can automatically generate documentation
• Logrotate friendly
• Easy to parse with logstash
• Special stack trace handling
Whatwouldyouliketo
see?
PartingThoughts
• There are no non-functional requirements
• Operators are users
• Be involved in the acceptance process
• Foster collaboration, not negotiation
• A lot has changed in 15 years
• Don’t let developers think Ops is exactly like Dev
Thanks!

More Related Content

PPTX
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
KEY
Erlang - Dive Right In
PDF
RSpec on Rails Tutorial
PDF
Great Tools Heavily Used In Japan, You Don't Know.
PDF
JavaScript Language Update 2016 (LLoT)
PPTX
Seawebperf 201207
PPTX
Aspect j introduction for non-programmers
PDF
Debugging ansible modules
Automating Your Daily Tasks with Scripting - RubyConf 2015 Taiwan
Erlang - Dive Right In
RSpec on Rails Tutorial
Great Tools Heavily Used In Japan, You Don't Know.
JavaScript Language Update 2016 (LLoT)
Seawebperf 201207
Aspect j introduction for non-programmers
Debugging ansible modules

What's hot (20)

PPTX
PPTX
Opscode Chef for Dummies
PDF
Approaching APIs
PDF
Node.js Anti-Patterns and bad practices
PDF
[123] quality without qa
KEY
CatalystX::SimpleLogin
KEY
Let's creating your own PHP (tejimaya version)
PDF
CodeCamp 2012-mvc-vs-ror-2
PDF
Testing sync engine
KEY
Rails development environment talk
KEY
Concurrency programming
PDF
GenRetry: Simple Exponential Backoff in Elixir
PDF
PHP7.1 New Features & Performance
PDF
Fluentd v11 at tokuben
PDF
prdc10-tdd-patterns
PPTX
Hands on Gradle
PPTX
Unit testing JavaScript: Jasmine & karma intro
PDF
Mocha, chai and sinon
PDF
Selenium Best Practices with Jason Huggins
PPTX
Webservices: The RESTful Approach
Opscode Chef for Dummies
Approaching APIs
Node.js Anti-Patterns and bad practices
[123] quality without qa
CatalystX::SimpleLogin
Let's creating your own PHP (tejimaya version)
CodeCamp 2012-mvc-vs-ror-2
Testing sync engine
Rails development environment talk
Concurrency programming
GenRetry: Simple Exponential Backoff in Elixir
PHP7.1 New Features & Performance
Fluentd v11 at tokuben
prdc10-tdd-patterns
Hands on Gradle
Unit testing JavaScript: Jasmine & karma intro
Mocha, chai and sinon
Selenium Best Practices with Jason Huggins
Webservices: The RESTful Approach
Ad

Viewers also liked (12)

PPTX
Sports That Hurt the Chances of Getting Life Insurance
PPTX
Video de estefania 2
PPTX
Citations UCEM (Texte 10.INT.1.4)
PDF
adv-workshop-Bertrando-EN
PDF
Cnc final project
DOCX
Roshore Brown resume (5)
DOCX
Formacion de proyectos
DOCX
Sistema nervioso bog
DOC
PDF
Nubia romero actividad1 2 mapac(1)
DOCX
1. infant school
Sports That Hurt the Chances of Getting Life Insurance
Video de estefania 2
Citations UCEM (Texte 10.INT.1.4)
adv-workshop-Bertrando-EN
Cnc final project
Roshore Brown resume (5)
Formacion de proyectos
Sistema nervioso bog
Nubia romero actividad1 2 mapac(1)
1. infant school
Ad

Similar to Opslogger: Operations code (should be) production quality too! (20)

PDF
Conditional Logging Considered Harmful - Sean Reilly
KEY
Cross-platform logging and analytics
KEY
Messaging, interoperability and log aggregation - a new framework
PDF
Lotuscript for large systems
PPTX
System insight without Interference
KEY
Message:Passing - lpw 2012
PPTX
Software testing and quality assurance
PDF
Troubleshooting Node.js
PDF
Redundant devops
PDF
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
PDF
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
PDF
How we realized SOA by Python at PyCon JP 2015
PDF
Get lean tutorial
KEY
Effectively Using UI Automation
PPTX
State of the art logging
PPTX
Keeping MongoDB Data Safe
KEY
Cooking a rabbit pie
PPTX
Que nos espera a los ALM Dudes para el 2013?
KEY
Message passing
PDF
How to Use Selenium, Successfully
Conditional Logging Considered Harmful - Sean Reilly
Cross-platform logging and analytics
Messaging, interoperability and log aggregation - a new framework
Lotuscript for large systems
System insight without Interference
Message:Passing - lpw 2012
Software testing and quality assurance
Troubleshooting Node.js
Redundant devops
Aki Salmi - Refactoring legacy code: a true story @ I T.A.K.E. Unconference 2...
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
How we realized SOA by Python at PyCon JP 2015
Get lean tutorial
Effectively Using UI Automation
State of the art logging
Keeping MongoDB Data Safe
Cooking a rabbit pie
Que nos espera a los ALM Dudes para el 2013?
Message passing
How to Use Selenium, Successfully

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
A Presentation on Artificial Intelligence
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Cloud computing and distributed systems.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Spectroscopy.pptx food analysis technology
A comparative analysis of optical character recognition models for extracting...
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
A Presentation on Artificial Intelligence
The AUB Centre for AI in Media Proposal.docx
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine Learning_overview_presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Cloud computing and distributed systems.
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Programs and apps: productivity, graphics, security and other tools
Network Security Unit 5.pdf for BCA BBA.
Spectroscopy.pptx food analysis technology

Opslogger: Operations code (should be) production quality too!