Guest blog post by Florian Motlik, Cofounder & CTO of Codeship Inc.
Over the last years Continuous Delivery has gained a massive following with many development teams embracing the style. Companies have chosen (as with many other modern developer tools), to either build their own or embrace a hosted service like Codeship. In the end though, no matter if you go with a hosted service or roll it on your own, the goal is to move faster and build a product that your customers really love. For that you need to iterate quickly, get feedback, and iterate again.
Successfully rolling out that process depends on many variables. Proper logging is one of those variables, and can be a helpful tool to remove fear.
Thou shalt not be afraid
As we’ve moved into the age of cloud software development, it is all about team productivity. Getting started on infrastructure is virtually free, so every team plays on the same level playing field and you need to constantly increase productivity to win.
By far the biggest killer of productivity is fear of moving faster because you might break things.
When your team, processes or technology are not built with constant change in mind, you decrease the speed in which you release to have better control. This is adownward spiral that will only lead to slower processes, less innovation and you losing your market.
Fear stops experiments and promotes stagnation.
Having a repeatable and easily automated process can drastically reduce that fear. The more you execute that automated process the safer you feel. Over time this will become stronger as all potential issues get discovered and fixed.
A second very important improvement is getting deep insights into any processes and workflows happening in your application.
When you continuously deploy changes to your application, being able to trace any step your application makes becomes your main tool to debug your production system.
The insight you can gain quickly from looking through your logs will often show you the problem a recent deploy brought into your infrastructure immediately.
This is indispensable with Continuous Delivery.
While Metrics are a great and very important part of getting insight into your infrastructure they only represent the state of the system. Additionally to understand the state you need to be able to trace and deeply understand anything happening in your infrastructure.
Integration with Pager systems provide an additional level of security on top of that to always be aware of problems happening.
Let there be light
We’ve grown accustomed to having full insight into our testing and deployment process as we are and have been using Codeship to build Codeship for a very long time. We understood we needed that same insight into our application as well to build the kind of infrastructure that supports the quality we want to deliver.
A good logging strategy and overview on your most important workflows is necessary.
Defining a graph of all the states that a workflow can have in your system makes it easy to add logging to each of those states and the transitions between them. At that point logging is not an afterthought, but integral part of your software development effort.
This needs to be clearly communicated to your team so everyone follows it thoroughly.
For example we test and deploy code for thousands of companies with many different language and infrastructure requirements. Those companies connect to GitHub or Bitbucket as their source code management system and various hosting providers like Heroku or AWS to deploy to. There are many moving parts in that system so we need to be able to detect and debug problems anytime without effort. A well thought out logging strategy can help tremendously and make it easy to fix issues when they come up. We can follow any build through all of our infrastructure and correlate issues between builds or our infrastructure anytime.
You can read more about how we use Logentries at Codeship in an earlier post.
Grand Central Logging
Being able to follow any workflow means collecting logs of various services in one place. If your developers have to look through various sources for correlating potential problems productivity and the speed to resolve an issue become very low.
Continuous Delivery is the future of building high class software. Automated testing and deployment build the basis of the workflow, but many other tools like centralized logging and error reporting are important building blocks of that workflow as well.
When your system feels like a black box you will hesitate to release changes to that infrastructure. Make sure you’re not stuck with that black box and build a workflow that makes your team more productive and increases your products quality.
If you want to learn more about Continuous Delivery you can also take a look at our crash course which can be found on the Codeship homepage.