How To Log NestJS Applications in a Distributed System — Part 1: winston

Let us take a look into winston logging, integrate it in a NestJS application and create centralized logging with Loki and Grafana

Itchimonji
CP Massive Programming

--

How To Log NestJS Applications in a Distributed System

Nowadays it is important to log your applications for better monitoring, debugging and failure handling (for example, in a Kubernetes cluster), and to ensure centralized logging for a better overview of a distributed system.

There are numerous applications and frameworks that make this possible. But in this series I want to focus on NestJS, winston, and the Loki Stack combined with Grafana.

A Distributed System of Microservices

On many platforms we can see how a system of dependent microservices is developed to satisfy the customer (e.g. Ebay TECH, Facebook). The biggest challenge is to ensure that all microservices can reached each other and thus to provide fail-safety to keep the customer happy. If a service is not available (e.g. network problems) or even failed, a responsible person would have to get notified and the service would have to restart itself if necessary. For this the applications need to be monitored. To read more about this, check out the guide on How To Monitor a Distributed System with a

--

--

Itchimonji
CP Massive Programming

Freelancer | Site Reliability Engineer (DevOps) / Kubernetes (CKAD) | Full Stack Software Engineer | https://patrick-eichler.com/links