Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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
Microservices with Go

You're reading from   Microservices with Go Building scalable and reliable microservices with Go

Arrow left icon
Product type Paperback
Published in Nov 2022
Publisher Packt
ISBN-13 9781804617007
Length 328 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Alexander Shuiskov Alexander Shuiskov
Author Profile Icon Alexander Shuiskov
Alexander Shuiskov
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1: Introduction
2. Chapter 1: Introduction to Microservices FREE CHAPTER 3. Part 2: Foundation
4. Chapter 2: Scaffolding a Go Microservice 5. Chapter 3: Service Discovery 6. Chapter 4: Serialization 7. Chapter 5: Synchronous Communication 8. Chapter 6: Asynchronous Communication 9. Chapter 7: Storing Service Data 10. Chapter 8: Deployment with Kubernetes 11. Chapter 9: Unit and Integration Testing 12. Part 3: Maintenance
13. Chapter 10: Reliability Overview 14. Chapter 11: Collecting Service Telemetry Data 15. Chapter 12: Setting Up Service Alerting 16. Chapter 13: Advanced Topics 17. Index 18. Other Books You May Enjoy

Collecting service logs

Logging is a technique that involves collecting real-time application performance data in the form of a time-ordered set of messages called a log. Here is an example of a service log:

2022/06/06 23:00:00 Service started
2022/06/06 23:00:01 Connecting to the database
2022/06/06 23:00:11 Unable to connect to the database: timeout error

Logs can help us understand what was happening in the application at a particular moment in time. As you can see in the preceding example, the service started at 11 P.M. and began connecting to the database a second later, finally logging a timeout error 10 seconds later.

Logs can provide lots of valuable insights about the component that emitted them, such as the following:

  • Order of operations: Logs can help us understand the logical sequence of operations performed by a service by showing when each operation took place.
  • Failed operations: One of the most useful applications of logs is the ability to see the...
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 $19.99/month. Cancel anytime
Banner background image