
The Three Pillars of Observability: Logs, Metrics, and Traces in Practice
Here's the article body markdown: Your logs say the request succeeded. Your users say it didn't. Sound familiar? Logs alone are like having security cameras but no audio, no motion sensors, and no way to correlate footage across rooms. You need all three pillars working together. ## Pillar 1: Structured Logs Stop doing this: typescript console.log( User ${userId} placed order ${orderId} ); Start doing this: typescript import pino from 'pino'; const logger = pino({ level: process.env.LOG_LEVEL || 'info', formatters: { level: (label) => ({ level: label }), }, timestamp: pino.stdTimeFunctions.isoTime, }); logger.info({ event: 'order.placed', userId, orderId, amount: order.total, correlationId: req.headers['x-correlation-id'], }, 'Order placed successfully'); The difference? The second version is **queryable**. When your Loki or CloudWatch Insights query looks like `{event="order.placed"} | json | amount > 500`, you'll understand why structure matters. **Pino vs Winston:** Pino is faster (
Continue reading on Dev.to DevOps
Opens in a new tab


