Reader small image

You're reading from  Mastering Spring Cloud

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788475433
Edition1st Edition
Languages
Right arrow
Author (1)
Piotr Mińkowski
Piotr Mińkowski
author image
Piotr Mińkowski

Piotr works as a Solution Architect at Red Hat. He has several years of experience in software architecture and development. During this time, he was working in large organizations, where he was responsible for IT transformation to the modern cloud-native development approach. He is interested in technologies related to programming, containerization, and microservices. He writes about it in his blog https://piotrminkowski.com.
Read more about Piotr Mińkowski

Right arrow

Best logging practices for microservices


One of the most important best practices for dealing with logging is to trace all the incoming requests and outgoing responses. Maybe it seems obvious to you, but I have seen a couple of applications that did not comply with that requirement. If you meet this demand, there is one consequence that occurs with microservices-based architecture. The overall number of logs in your system increases compared to monolithic applications, where there is no messaging. This, in turn, requires us to pay even more attention to logging than before. We should do our best to generate as little information as possible, even though this information can tell us much about the situation. How do we achieve this? First of all, it is good to have the same log message format across all the microservices. For example, let's consider how to print variables in the application logs. I suggest you use the JSON notation in view of the fact that, usually, messages exchanged between...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Spring Cloud
Published in: Apr 2018Publisher: PacktISBN-13: 9781788475433

Author (1)

author image
Piotr Mińkowski

Piotr works as a Solution Architect at Red Hat. He has several years of experience in software architecture and development. During this time, he was working in large organizations, where he was responsible for IT transformation to the modern cloud-native development approach. He is interested in technologies related to programming, containerization, and microservices. He writes about it in his blog https://piotrminkowski.com.
Read more about Piotr Mińkowski