Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Microservices with Go

You're reading from   Building Microservices with Go Develop seamless, efficient, and robust microservices with Go

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher
ISBN-13 9781786468666
Length 358 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nic Jackson Nic Jackson
Author Profile Icon Nic Jackson
Nic Jackson
Arrow right icon
View More author details
Toc

Logging best practices


In the free e-book, The Pragmatic Logging Handbook, by Jon Gifford of Loggly (https://www.loggly.com/), Jon proposes the following eight best practices to apply when determining your logging strategy:

  • Treat application logging as an ongoing iterative process. Log at a high level and then add deeper instrumentation.
  • Always instrument anything that goes out of the process because distributed system problems are not well behaved.
  • Always log unacceptable performance. Log anything outside the range in which you expect your system to perform.
  • If possible, always log sufficient context for a complete picture of what happened from a single log event.
  • View machines as your end consumer, not humans. Create records that your log management solution can interpret.
  • Trends tell the story better than data points.
  • Instrumentation is NOT a substitute for profiling and vice versa.
  • Flying more slowly is better than flying blind. So the debate is not whether to instrument, just how much.

I think...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime