Node.js / NestJS

DevOps, Logging & CI/CD

Winston, Pino, structured logging, correlation IDs, APM, GitHub Actions, GitLab CI, pipelines, automated testing, deployment automation

25 pytań z rozmów·
Mid-Level
1

What is the main difference between Winston and Pino?

Odpowiedź

Pino is designed to be extremely fast with low overhead (asynchronous by default), while Winston is more feature-rich but slightly slower. Pino uses structured JSON by default and avoids synchronous transformations, making it ideal for high-performance applications. Winston offers more transports and formatting options out of the box.

2

What is a correlation ID in the context of logging?

Odpowiedź

A correlation ID is a unique identifier (UUID) associated with an HTTP request or event, allowing tracing of all related operations across different services and logs. This facilitates debugging distributed systems by grouping all logs from the same transaction. It is typically propagated via HTTP headers (X-Correlation-ID).

3

What is the main advantage of structured logging?

Odpowiedź

Structured logging (logs in JSON format with key-value fields) allows easy filtering, searching, and analysis with tools like Elasticsearch, Grafana, or Datadog. Unlike plain text logs, structured logs can be indexed and queried efficiently. This greatly improves observability and debugging in production.

4

What are the standard log levels in Winston and Pino?

5

How to implement a global logger in NestJS?

+22 pytań z rozmów

Opanuj Node.js / NestJS na następną rozmowę

Uzyskaj dostęp do wszystkich pytań, flashcards, testów technicznych, ćwiczeń code review i symulatorów rozmów.

Zacznij za darmo