Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics about EventLoop #4675

Closed
ikhoon opened this issue Feb 17, 2023 · 6 comments · Fixed by #4750
Closed

Add metrics about EventLoop #4675

ikhoon opened this issue Feb 17, 2023 · 6 comments · Fixed by #4750
Milestone

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Feb 17, 2023

Micrometer does not support metrics for Netty's EventLoop. micrometer-metrics/micrometer#522
We may add our custom metrics for EventLoop.

  • Number of EventLoops
  • Number of pending tasks.
  • ...
@seonWKim
Copy link
Contributor

Looks interesting. If no one's assigned, may I look into the issues ?

@ikhoon
Copy link
Contributor Author

ikhoon commented Feb 22, 2023

For sure. Thanks for your interest. 😀

@vkostyukov
Copy link
Contributor

Checking to see if I missed a PR addressing this ticket? We need something like this internally so I wanted to build something ad-hoc. @seonwoo960000 are you actively working on it?

@seonWKim
Copy link
Contributor

seonWKim commented Mar 9, 2023

Hi @vkostyukov ! I'm not currently working on this and I think you can first work on this issue.

@vkostyukov
Copy link
Contributor

Thanks! I will grab this!

@vkostyukov
Copy link
Contributor

Got a PR here: #4750 4750

@ikhoon ikhoon added this to the 1.23.0 milestone Mar 27, 2023
trustin pushed a commit that referenced this issue Mar 28, 2023
Motivation:

We want to export some very basic metrics about the underlying Netty runtime. Let's start with the number of event-loops and the number of IO tasks waiting to be executed. 

Modifications:

- Added `EventLoopMetrics`, which implements `MeterBinder`.
- The approach to count pending-io-tasks is highly inspired by [this gauge from Finagle](https://github.com/twitter/finagle/blob/develop/finagle-netty4/src/main/scala/com/twitter/finagle/netty4/WorkerEventLoop.scala#L32-L47). It's also pretty similar how we do it internally at Databricks.
- Registered `CommonPools` event-loop-groups for metrics collection.

Result:

- Closes #4675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants