Node.js / NestJS

DevOps, Logging & CI/CD

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

25 gespreksvragen·
Mid-Level
1

What is the main difference between Winston and Pino?

Antwoord

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?

Antwoord

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?

Antwoord

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 gespreksvragen

Beheers Node.js / NestJS voor je volgende gesprek

Krijg toegang tot alle vragen, flashcards, technische tests, code review-oefeningen en gespreksimulatoren.

Begin gratis