{"library":"express-correlation-id","type":"library","category":null,"description":"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.","language":"javascript","status":"active","version":"3.0.1","tags":["javascript","express","logging","correlation","debug"],"last_verified":"Wed May 27","install":[{"cmd":"npm install express-correlation-id","imports":["import correlator from 'express-correlation-id';","import correlator from 'express-correlation-id';\nconst id = correlator.getId();","import correlator from 'express-correlation-id';\ncorrelator.setId('my-custom-id');"]},{"cmd":"yarn add express-correlation-id","imports":[]},{"cmd":"pnpm add express-correlation-id","imports":[]}],"homepage":null,"github":"https://github.com/toboid/express-correlation-id","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/express-correlation-id","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/express-correlation-id/compatibility"}}