You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m opening this to discuss which modules are essential and make sense to add this API to, and where in the package they would go, this would be essential to improve the traceability of Express applications
expressjs: Request and Response Functions
router: Layer
Feel free to edit which packages need the integration.
As I mentioned in the meeting, for now I'm only interested in adding it to the router package. However, before that, I need to finish some other pending work I have in that package, so it will take me some time to integrate it. If someone else wants to move forward with it in the meantime, that's totally fine with me.
I was trying to get some more detailed overview on this topic. There are many different directions now. I will point everything in the end. As a starting point I can see this Draft PR pillarjs/router#96
This connects with @bjohansebas comment for implementing it in router package.
Based on the OP comment this PR needs to be reworked to be up-to-date. I can at least take a look on this. I'm planning to compare it with what's currently stable in the nodejs docs for diagnostics channels and compare with implementation from fastify. The second part with fastify is just for me to make sure I look on something done right.
After that I can let you know if I understand anything from it.
Except from that I can see there are other topics that fly around:
considering OpenTelemetry. I'm not sure if this conflicts here with anything as they operate on different levels and probably different purpose (?) I feel this can be done as a separate activity
replacing debug with any other package. Again, I can see this as another separate small PR. Also, what should be prepared except PR with replacement? Some benchmarks, tests, comparison with other solutions?
implementations in different repositories than router. I think we can decide which one to qualify later and focus to deliver one draft implementation in router, right?
The approach of Fastify is different because they have hooks, and for each hook they send certain information, usually reply and request (it's been a while since I looked at Fastify's implementation for other reasons). I had been thinking about having the router only send data (layer, req, res) when it enters handleResponse and handleError.
@bjohansebas if I'm understanding correctly, it seems like significant work here has been done in PillarJS, and that once that's merged and deployed that should handle the majority of the work that's being discussed here. Are you okay with us closing this issue, or would you prefer to keep it open?
Yep, I think we can also add more on the Express side, particularly around views, but yeah, I think we can close it in the end. This group can't get that PR merged.
Activity
wesleytodd commentedon May 16, 2025
pillarjs/router#96
expressjs/express#6353
I feel like there are more open issues, but I couldn't remember any of them off hand.
Ah, this one is related but not exactly the same: expressjs/discussions#341
And I think we will need to look at
body-parser,serve-static,sendand probably some of the middleware packages.wesleytodd commentedon Aug 6, 2025
Looking for a champion on this work. Also may consider asking APM folks to come help us understand the needs and maybe remove some usage of
debug.bjohansebas commentedon Aug 6, 2025
As I mentioned in the meeting, for now I'm only interested in adding it to the router package. However, before that, I need to finish some other pending work I have in that package, so it will take me some time to integrate it. If someone else wants to move forward with it in the meantime, that's totally fine with me.
kjugi commentedon Aug 13, 2025
I was trying to get some more detailed overview on this topic. There are many different directions now. I will point everything in the end. As a starting point I can see this Draft PR pillarjs/router#96
This connects with @bjohansebas comment for implementing it in router package.
Based on the OP comment this PR needs to be reworked to be up-to-date. I can at least take a look on this. I'm planning to compare it with what's currently stable in the nodejs docs for diagnostics channels and compare with implementation from fastify. The second part with fastify is just for me to make sure I look on something done right.
After that I can let you know if I understand anything from it.
Except from that I can see there are other topics that fly around:
debugwith any other package. Again, I can see this as another separate small PR. Also, what should be prepared except PR with replacement? Some benchmarks, tests, comparison with other solutions?bjohansebas commentedon Aug 23, 2025
The approach of Fastify is different because they have hooks, and for each hook they send certain information, usually
replyandrequest(it's been a while since I looked at Fastify's implementation for other reasons). I had been thinking about having the router only send data (layer, req, res) when it entershandleResponseandhandleError.O4FDev commentedon Aug 21, 2026
pillarjs/router#196
@bjohansebas if I'm understanding correctly, it seems like significant work here has been done in PillarJS, and that once that's merged and deployed that should handle the majority of the work that's being discussed here. Are you okay with us closing this issue, or would you prefer to keep it open?
bjohansebas commentedon Aug 21, 2026
Yep, I think we can also add more on the Express side, particularly around views, but yeah, I think we can close it in the end. This group can't get that PR merged.