Skip to content

Add eventexecutor.workers metrics for NettyΒ #6375

Description

@divijvaidya

Please describe the feature request.
We added a few Netty event executor related metrics at #522. This is a request to add another metrics eventexecutor.workers to the list of Netty metrics. This new metric represents the total number of Netty's event loops.

Rationale
A similar metric was added to Armeria with line/armeria#4675. This is a useful metric while debugging to determine the number of workers without having to explicitly look at the configuration.

Additional context
We could choose to use the reference implementation (Apache v2 license) at https://github.com/line/armeria/blob/024f86dedccc7897a6206770dd95852ca2ed66cc/core/src/main/java/com/linecorp/armeria/common/metric/EventLoopMetrics.java#L88

Activity

  1. shakuzen commented on Jun 10, 2025

    @shakuzen
    Member

    Thanks for opening the issue. It sounds like it's probably generally useful. Could you share more context on when users would use this metric and for what purpose, to help me understand as not a heavy Netty user? Also, would you be willing to submit a pull request for this?

  2. added this to the 1.x milestone on Jun 10, 2025
  3. added theissue type on Jun 10, 2025
  4. ttaehee commented on Aug 10, 2025

    @ttaehee
    Contributor

    @shakuzen @divijvaidya Hi, I've submitted a pull request to address this. The PR is available here: #6612

    My approach was to add the workers metric by checking for instanceof MultithreadEventLoopGroup to ensure accuracy without changing the public API.

    Any feedback would be greatly appreciated!

  5. modified the milestones: 1.x, 1.16.0-M3 on Aug 20, 2025
  6. added
    instrumentationAn issue that is related to instrumenting a component
    and removed
    help wantedAn issue that a contributor can help us with
    on Aug 20, 2025
  7. linked a pull request that will close this issueAdd eventexecutor workers metric for netty #6612on Aug 20, 2025
  8. added a commit that references this issue on Aug 29, 2025
    f2ea418
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

    enhancementA general enhancementinstrumentationAn issue that is related to instrumenting a componentmodule: micrometer-coreAn issue that is related to our core module

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions