puzpuzpuz/cls-rtracer

Migrate to Fastify lifecycle hook instead of middleware

puzpuzpuz opened this issue · 5 comments

Upcoming fastify v3 will not ship with support for connect style middleware out of the box, would be wonderful if this module would be compatible out of the box 👍

@SimenB thanks for the heads up! I'll include this one into v2.1.0.

Another link - fastify has a concept of request ID already. I'm not sure if it's possible to hook into it, but making them play nice together would be wonderful - see https://www.fastify.io/docs/v3.0.x/Server/#requestidheader and the 2 entries below it

(Caveat: our current app is using Express, but I'm looking into migrating to Fastify. So I don't have much knowledge about how this ties together)

@SimenB thanks for sharing these links. I've implemented the plugin, as well as an option for Fastify request id integration. See #30