[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"header-categories":3,"post-monitoring-observability-web-applications":73,"parsed-post-434fd4db-d17e-4188-b412-6b5c5d821c8a":146},{"success":4,"data":5},true,{"items":6,"pagination":70},[7,16,24,32,40,48,56,63],{"id":8,"name":9,"description":10,"parentId":11,"createdAt":12,"updatedAt":12,"parent":11,"children":13,"_count":14},"ai-future","AI & The Future","Artificial intelligence and emerging technology",null,"2026-07-24T06:02:45.990Z",[],{"posts":15},1,{"id":17,"name":18,"description":19,"parentId":11,"createdAt":20,"updatedAt":20,"parent":11,"children":21,"_count":22},"tools-productivity","Tools & Productivity","Developer tools and workflow optimization","2026-07-24T06:02:45.712Z",[],{"posts":23},7,{"id":25,"name":26,"description":27,"parentId":11,"createdAt":28,"updatedAt":28,"parent":11,"children":29,"_count":30},"career","Career & Growth","Professional development for developers","2026-07-24T06:02:45.486Z",[],{"posts":31},3,{"id":33,"name":34,"description":35,"parentId":11,"createdAt":36,"updatedAt":36,"parent":11,"children":37,"_count":38},"opinion","Opinion & Analysis","Industry analysis and technical opinions","2026-07-24T06:02:45.272Z",[],{"posts":39},6,{"id":41,"name":42,"description":43,"parentId":11,"createdAt":44,"updatedAt":44,"parent":11,"children":45,"_count":46},"tutorials","Tutorials","Step-by-step learning guides","2026-07-24T06:02:44.965Z",[],{"posts":47},21,{"id":49,"name":50,"description":51,"parentId":11,"createdAt":52,"updatedAt":52,"parent":11,"children":53,"_count":54},"software-engineering","Software Engineering","Best practices, patterns, and principles","2026-07-24T06:02:44.689Z",[],{"posts":55},24,{"id":57,"name":58,"description":59,"parentId":11,"createdAt":60,"updatedAt":60,"parent":11,"children":61,"_count":62},"devops-cloud","DevOps & Cloud","Infrastructure, deployment, and cloud computing","2026-07-24T06:02:44.453Z",[],{"posts":39},{"id":64,"name":65,"description":66,"parentId":11,"createdAt":67,"updatedAt":67,"parent":11,"children":68,"_count":69},"web-development","Web Development","Frontend and backend web development tutorials and guides","2026-07-24T06:02:44.169Z",[],{"posts":55},{"page":15,"limit":71,"total":71,"totalPages":15,"hasNext":72,"hasPrev":72},8,false,{"success":4,"data":74},{"id":75,"slug":76,"title":77,"excerpt":78,"content":79,"status":80,"visibility":81,"featuredImage":82,"canonicalUrl":11,"readingTime":83,"viewCount":84,"commentEnabled":4,"publishedAt":85,"scheduledAt":11,"createdAt":86,"updatedAt":87,"seoTitle":88,"seoDescription":78,"seoKeywords":11,"authorId":89,"author":90,"coAuthors":95,"tags":96,"categories":112,"comments":115,"_count":116,"relatedPosts":118},"434fd4db-d17e-4188-b412-6b5c5d821c8a","monitoring-observability-web-applications","Monitoring and Observability for Web Applications","Set up proper monitoring with structured logging, error tracking, performance metrics, and alerting before your users find the bugs.","## Observability ≠ Monitoring\n\n**Monitoring** tells you something is wrong (alert: 500 errors spiking).\n**Observability** helps you understand why (trace the request through your system).\n\nThe three pillars: **Logs**, **Metrics**, **Traces**.\n\n## Structured Logging\n\n```typescript\n\u002F\u002F ❌ Unstructured — hard to search and parse\nconsole.log('User ' + userId + ' created post ' + postId)\n\n\u002F\u002F ✅ Structured — queryable and parseable\nlogger.info('Post created', {\n  userId,\n  postId,\n  duration: elapsed,\n  tags: post.tags,\n})\n```\n\nA simple structured logger:\n\n```typescript\ntype LogLevel = 'debug' | 'info' | 'warn' | 'error'\n\nfunction createLogger(service: string) {\n  return {\n    info: (message: string, meta?: Record\u003Cstring, unknown>) =>\n      emit('info', message, meta),\n    error: (message: string, error?: Error, meta?: Record\u003Cstring, unknown>) =>\n      emit('error', message, { ...meta, error: error?.stack }),\n  }\n\n  function emit(level: LogLevel, message: string, meta?: Record\u003Cstring, unknown>) {\n    const entry = {\n      timestamp: new Date().toISOString(),\n      level,\n      service,\n      message,\n      ...meta,\n    }\n    console.log(JSON.stringify(entry))\n  }\n}\n\nconst logger = createLogger('api')\n```\n\n## Error Tracking\n\n```typescript\n\u002F\u002F server\u002Fplugins\u002Ferror-tracking.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('error', (error, { event }) => {\n    \u002F\u002F Send to Sentry, Bugsnag, etc.\n    reportError({\n      error,\n      url: event?.path,\n      user: event?.context?.user?.id,\n      timestamp: Date.now(),\n    })\n  })\n})\n```\n\n::callout{icon=\"i-lucide-bell\" color=\"warning\"}\nDon't just log errors — alert on them. An error in your logs that nobody sees is the same as no error tracking at all.\n::\n\n## Key Metrics to Track\n\n**Application metrics:**\n- Request rate (requests\u002Fsecond)\n- Error rate (5xx responses \u002F total)\n- Latency (p50, p95, p99)\n- Active users\n\n**Infrastructure metrics:**\n- CPU \u002F Memory usage\n- Database connection pool utilization\n- Queue depth\n\n## Health Check Endpoint\n\n```typescript\n\u002F\u002F server\u002Fapi\u002Fhealth.get.ts\nexport default defineEventHandler(async () => {\n  const checks = {\n    database: await checkDb(),\n    redis: await checkRedis(),\n    storage: await checkS3(),\n  }\n\n  const healthy = Object.values(checks).every(c => c.status === 'ok')\n\n  return {\n    status: healthy ? 'healthy' : 'degraded',\n    checks,\n    version: process.env.APP_VERSION,\n    uptime: process.uptime(),\n  }\n})\n```\n\n## Alerting Rules\n\nSet alerts based on:\n- Error rate > 1% for 5 minutes\n- P95 latency > 2 seconds\n- Health check failures for 2+ consecutive checks\n- Disk usage > 80%\n\n**Key principle:** Alert on symptoms (users are affected), not causes (CPU is high). High CPU that doesn't impact users isn't an emergency.\n\n## Start Simple\n\nYou don't need a full observability platform on day one:\n1. Structured JSON logs → searchable in any log viewer\n2. Health check endpoint → uptime monitoring (free tier from UptimeRobot)\n3. Error tracking → Sentry free tier\n4. Basic metrics → built into your hosting platform\n\nAdd complexity only when you need to answer questions your current tools can't.\n","published","public","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1555066931-4365d14bab8c?w=1200&q=80",10,793,"2026-05-22T06:04:00.554Z","2026-07-24T06:04:00.557Z","2026-07-28T17:12:47.877Z","Monitoring and Observability for Web Applications | BitBlog","fddb5d93-7a2c-4d86-a06a-fa32e73a01c6",{"email":91,"bio":92,"id":89,"name":93,"avatarUrl":94},"mbeahessilfieprince@gmail.com","Fullstack Software Developer ","Mbeah Essilfie","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93322394?v=4",[],[97,102,107],{"id":98,"name":99,"color":100,"description":101},"nodejs","Node.js","#339933","JavaScript runtime built on V8",{"id":103,"name":104,"color":105,"description":106},"devops","DevOps","#ff6c37","Development and Operations",{"id":108,"name":109,"color":110,"description":111},"performance","Performance","#e535ab","Web performance optimization",[113,114],{"id":57,"name":58,"description":59},{"id":49,"name":50,"description":51},[],{"comments":117},0,[119,128,136],{"id":120,"slug":121,"title":122,"excerpt":123,"featuredImage":124,"viewCount":125,"readingTime":71,"publishedAt":126,"author":127},"2997028f-4d22-4eb7-9d86-894a54cb559a","building-type-safe-apis-nuxt3-prisma","Building Type-Safe APIs with Nuxt 3 and Prisma","Learn how to build end-to-end type-safe APIs using Nuxt 3 server routes and Prisma ORM for a seamless developer experience.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1498050108023-c5249f4df085?w=1200&q=80",1922,"2026-07-23T06:02:46.910Z",{"id":89,"name":93,"avatarUrl":94},{"id":129,"slug":130,"title":131,"excerpt":132,"featuredImage":82,"viewCount":133,"readingTime":83,"publishedAt":134,"author":135},"da9e4553-8b0d-411e-b4ec-f9684017e163","mastering-tailwind-css-design-systems","Mastering Tailwind CSS: From Utility Classes to Design Systems","Go beyond basic utility classes and learn how to build cohesive, maintainable design systems with Tailwind CSS.",257,"2026-07-21T06:02:49.268Z",{"id":89,"name":93,"avatarUrl":94},{"id":137,"slug":138,"title":139,"excerpt":140,"featuredImage":141,"viewCount":142,"readingTime":143,"publishedAt":144,"author":145},"50add5fc-4026-4267-b917-7f71ea9e35b0","complete-guide-vue3-composables","The Complete Guide to Vue 3 Composables","Understand the power of Vue 3's Composition API through practical, real-world composable patterns that you can use today.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1517694712202-14dd9538aa97?w=1200&q=80",990,12,"2026-07-19T06:02:51.753Z",{"id":89,"name":93,"avatarUrl":94},{"data":147,"body":149,"toc":430},{"title":148,"description":148},"",{"type":150,"children":151},"root",[152,161,180,205,211,224,229,237,243,251,262,268,276,301,309,327,333,341,347,352,375,385,391,396,420,425],{"type":153,"tag":154,"props":155,"children":157},"element","h2",{"id":156},"observability-monitoring",[158],{"type":159,"value":160},"text","Observability ≠ Monitoring",{"type":153,"tag":162,"props":163,"children":164},"p",{},[165,171,173,178],{"type":153,"tag":166,"props":167,"children":168},"strong",{},[169],{"type":159,"value":170},"Monitoring",{"type":159,"value":172}," tells you something is wrong (alert: 500 errors spiking).\n",{"type":153,"tag":166,"props":174,"children":175},{},[176],{"type":159,"value":177},"Observability",{"type":159,"value":179}," helps you understand why (trace the request through your system).",{"type":153,"tag":162,"props":181,"children":182},{},[183,185,190,192,197,198,203],{"type":159,"value":184},"The three pillars: ",{"type":153,"tag":166,"props":186,"children":187},{},[188],{"type":159,"value":189},"Logs",{"type":159,"value":191},", ",{"type":153,"tag":166,"props":193,"children":194},{},[195],{"type":159,"value":196},"Metrics",{"type":159,"value":191},{"type":153,"tag":166,"props":199,"children":200},{},[201],{"type":159,"value":202},"Traces",{"type":159,"value":204},".",{"type":153,"tag":154,"props":206,"children":208},{"id":207},"structured-logging",[209],{"type":159,"value":210},"Structured Logging",{"type":153,"tag":212,"props":213,"children":218},"pre",{"className":214,"code":215,"language":216,"meta":148,"style":217},"language-typescript","\u002F\u002F ❌ Unstructured — hard to search and parse\nconsole.log('User ' + userId + ' created post ' + postId)\n\n\u002F\u002F ✅ Structured — queryable and parseable\nlogger.info('Post created', {\n  userId,\n  postId,\n  duration: elapsed,\n  tags: post.tags,\n})\n","typescript","undefined",[219],{"type":153,"tag":220,"props":221,"children":222},"code",{"__ignoreMap":148},[223],{"type":159,"value":215},{"type":153,"tag":162,"props":225,"children":226},{},[227],{"type":159,"value":228},"A simple structured logger:",{"type":153,"tag":212,"props":230,"children":232},{"className":214,"code":231,"language":216,"meta":148,"style":217},"type LogLevel = 'debug' | 'info' | 'warn' | 'error'\n\nfunction createLogger(service: string) {\n  return {\n    info: (message: string, meta?: Record\u003Cstring, unknown>) =>\n      emit('info', message, meta),\n    error: (message: string, error?: Error, meta?: Record\u003Cstring, unknown>) =>\n      emit('error', message, { ...meta, error: error?.stack }),\n  }\n\n  function emit(level: LogLevel, message: string, meta?: Record\u003Cstring, unknown>) {\n    const entry = {\n      timestamp: new Date().toISOString(),\n      level,\n      service,\n      message,\n      ...meta,\n    }\n    console.log(JSON.stringify(entry))\n  }\n}\n\nconst logger = createLogger('api')\n",[233],{"type":153,"tag":220,"props":234,"children":235},{"__ignoreMap":148},[236],{"type":159,"value":231},{"type":153,"tag":154,"props":238,"children":240},{"id":239},"error-tracking",[241],{"type":159,"value":242},"Error Tracking",{"type":153,"tag":212,"props":244,"children":246},{"className":214,"code":245,"language":216,"meta":148,"style":217},"\u002F\u002F server\u002Fplugins\u002Ferror-tracking.ts\nexport default defineNitroPlugin((nitroApp) => {\n  nitroApp.hooks.hook('error', (error, { event }) => {\n    \u002F\u002F Send to Sentry, Bugsnag, etc.\n    reportError({\n      error,\n      url: event?.path,\n      user: event?.context?.user?.id,\n      timestamp: Date.now(),\n    })\n  })\n})\n",[247],{"type":153,"tag":220,"props":248,"children":249},{"__ignoreMap":148},[250],{"type":159,"value":245},{"type":153,"tag":252,"props":253,"children":256},"callout",{"color":254,"icon":255},"warning","i-lucide-bell",[257],{"type":153,"tag":162,"props":258,"children":259},{},[260],{"type":159,"value":261},"Don't just log errors — alert on them. An error in your logs that nobody sees is the same as no error tracking at all.",{"type":153,"tag":154,"props":263,"children":265},{"id":264},"key-metrics-to-track",[266],{"type":159,"value":267},"Key Metrics to Track",{"type":153,"tag":162,"props":269,"children":270},{},[271],{"type":153,"tag":166,"props":272,"children":273},{},[274],{"type":159,"value":275},"Application metrics:",{"type":153,"tag":277,"props":278,"children":279},"ul",{},[280,286,291,296],{"type":153,"tag":281,"props":282,"children":283},"li",{},[284],{"type":159,"value":285},"Request rate (requests\u002Fsecond)",{"type":153,"tag":281,"props":287,"children":288},{},[289],{"type":159,"value":290},"Error rate (5xx responses \u002F total)",{"type":153,"tag":281,"props":292,"children":293},{},[294],{"type":159,"value":295},"Latency (p50, p95, p99)",{"type":153,"tag":281,"props":297,"children":298},{},[299],{"type":159,"value":300},"Active users",{"type":153,"tag":162,"props":302,"children":303},{},[304],{"type":153,"tag":166,"props":305,"children":306},{},[307],{"type":159,"value":308},"Infrastructure metrics:",{"type":153,"tag":277,"props":310,"children":311},{},[312,317,322],{"type":153,"tag":281,"props":313,"children":314},{},[315],{"type":159,"value":316},"CPU \u002F Memory usage",{"type":153,"tag":281,"props":318,"children":319},{},[320],{"type":159,"value":321},"Database connection pool utilization",{"type":153,"tag":281,"props":323,"children":324},{},[325],{"type":159,"value":326},"Queue depth",{"type":153,"tag":154,"props":328,"children":330},{"id":329},"health-check-endpoint",[331],{"type":159,"value":332},"Health Check Endpoint",{"type":153,"tag":212,"props":334,"children":336},{"className":214,"code":335,"language":216,"meta":148,"style":217},"\u002F\u002F server\u002Fapi\u002Fhealth.get.ts\nexport default defineEventHandler(async () => {\n  const checks = {\n    database: await checkDb(),\n    redis: await checkRedis(),\n    storage: await checkS3(),\n  }\n\n  const healthy = Object.values(checks).every(c => c.status === 'ok')\n\n  return {\n    status: healthy ? 'healthy' : 'degraded',\n    checks,\n    version: process.env.APP_VERSION,\n    uptime: process.uptime(),\n  }\n})\n",[337],{"type":153,"tag":220,"props":338,"children":339},{"__ignoreMap":148},[340],{"type":159,"value":335},{"type":153,"tag":154,"props":342,"children":344},{"id":343},"alerting-rules",[345],{"type":159,"value":346},"Alerting Rules",{"type":153,"tag":162,"props":348,"children":349},{},[350],{"type":159,"value":351},"Set alerts based on:",{"type":153,"tag":277,"props":353,"children":354},{},[355,360,365,370],{"type":153,"tag":281,"props":356,"children":357},{},[358],{"type":159,"value":359},"Error rate > 1% for 5 minutes",{"type":153,"tag":281,"props":361,"children":362},{},[363],{"type":159,"value":364},"P95 latency > 2 seconds",{"type":153,"tag":281,"props":366,"children":367},{},[368],{"type":159,"value":369},"Health check failures for 2+ consecutive checks",{"type":153,"tag":281,"props":371,"children":372},{},[373],{"type":159,"value":374},"Disk usage > 80%",{"type":153,"tag":162,"props":376,"children":377},{},[378,383],{"type":153,"tag":166,"props":379,"children":380},{},[381],{"type":159,"value":382},"Key principle:",{"type":159,"value":384}," Alert on symptoms (users are affected), not causes (CPU is high). High CPU that doesn't impact users isn't an emergency.",{"type":153,"tag":154,"props":386,"children":388},{"id":387},"start-simple",[389],{"type":159,"value":390},"Start Simple",{"type":153,"tag":162,"props":392,"children":393},{},[394],{"type":159,"value":395},"You don't need a full observability platform on day one:",{"type":153,"tag":397,"props":398,"children":399},"ol",{},[400,405,410,415],{"type":153,"tag":281,"props":401,"children":402},{},[403],{"type":159,"value":404},"Structured JSON logs → searchable in any log viewer",{"type":153,"tag":281,"props":406,"children":407},{},[408],{"type":159,"value":409},"Health check endpoint → uptime monitoring (free tier from UptimeRobot)",{"type":153,"tag":281,"props":411,"children":412},{},[413],{"type":159,"value":414},"Error tracking → Sentry free tier",{"type":153,"tag":281,"props":416,"children":417},{},[418],{"type":159,"value":419},"Basic metrics → built into your hosting platform",{"type":153,"tag":162,"props":421,"children":422},{},[423],{"type":159,"value":424},"Add complexity only when you need to answer questions your current tools can't.",{"type":153,"tag":426,"props":427,"children":428},"style",{},[429],{"type":159,"value":148},{"title":148,"searchDepth":431,"depth":431,"links":432},2,[433,434,435,436,437,438,439],{"id":156,"depth":431,"text":160},{"id":207,"depth":431,"text":210},{"id":239,"depth":431,"text":242},{"id":264,"depth":431,"text":267},{"id":329,"depth":431,"text":332},{"id":343,"depth":431,"text":346},{"id":387,"depth":431,"text":390}]