On December 16, 2016, DevFacto hosted Quality Conf 16.2 – a full-day internal conference dedicated to learning and team building. A number of sessions were presented by our team members which focused on everything from personal to technical growth. In this post, we recap “Logging Like it Matters” which was originally presented by DevFacto consultant Mark Thiessen.
Overview
In enterprise application development, effective logging and analytics is sometimes an afterthought. While developers building products and customer-facing applications have long been using data to inform their decisions, internally facing — even business-critical applications — are often built without the same care given to collecting usage data and system metrics. This valuable data can be used to drive project and feature decision making and improve the team’s ability to maintain their software.
In the last several years, structured logging has become standard as a logging method that facilitates the usage of more powerful tools for analyzing and aggregating logging data. There has been a recent explosion of tools available to developers. If you’re not familiar with the concept of structured logging or are not using some of the available tools to track and analyze usage of your software, gain insight into performance issues, or even view detailed exception information, now is a great time to start.
“The best time to improve your analytics was before you had an issue in production. The second best time is now.” – Mark’s take on a Chinese Proverb
Key Takeaways
Developers should start moving away from primitive logging methods like writing free text to files that are hunted down and analyzed after production problems occur. There are several great tools available that require minimal investment to get started and provide insight into usage, performance, and make it easy to collect good exception information with context that enables better debugging.
For .NET developers looking to get started, I’ll propose a couple of recommendations. If you’re looking to get an introduction to the concept of structured logging, check out SeriLog and Seq. If you’re looking for a drop-in, extensible analytics solution for your applications, Microsoft’s Application Insights is a great place to start. It has a low barrier to entry for .NET developers to begin tracking performance and usage data. In addition to collecting server-side data, you can also ramp up your analytics to include client-side performance and browser exceptions and track custom structured data events as your logging needs and skills develop.
Usage data collected should be surfaced and shared frequently to inform decisions about feature development, maintenance, and other enhancements as your applications evolve to better meet the needs of their users.