Skip to content

Diagnostics channels #11

Closed as not planned
Closed as not planned

Description

@bjohansebas

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.

Activity

  1. wesleytodd commented on May 16, 2025

    @wesleytodd
    Member

    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, send and probably some of the middleware packages.

  2. wesleytodd commented on Aug 6, 2025

    @wesleytodd
    Member

    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.

  3. bjohansebas commented on Aug 6, 2025

    @bjohansebas
    MemberAuthor

    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.

  4. kjugi commented on Aug 13, 2025

    @kjugi
    Member

    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?
  5. bjohansebas commented on Aug 23, 2025

    @bjohansebas
    MemberAuthor

    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.

  6. O4FDev commented on Aug 21, 2026

    @O4FDev
    Member

    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?

  7. bjohansebas commented on Aug 21, 2026

    @bjohansebas
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions