Preparing for system design interviews?  Try bugzed.com →

Express Correlation ID Middleware

JSON →
library 3.0.1 ·javascript
verified Jun 17, 2026

express-correlation-id is an Express middleware that provides a unique correlation identifier for each incoming HTTP request, ensuring consistency across all asynchronous operations within the request's lifecycle. It automatically generates a UUID if no `x-correlation-id` header is present (or a configurable custom header). The library is currently stable at version 3.0.1, with recent updates indicating active maintenance. Version 3.x introduced a breaking change by requiring Node.js 16 or newer, with Node.js 20 being recommended. Its key differentiators include a simple API to access the ID via both the `req` object (`req.correlationId()`) and a static module method (`correlator.getId()`), as well as the ability to programmatically set the ID. It differentiates itself by its focus on robust async context handling for the correlation ID.

total hits 12
actors 4 distinct systems
last hit 16d ago AhrefsBot
GPTBot
4
ByteDance
3
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore · 🇩🇪 Germany