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

Collect Worker Count Metric that Runs Through the Background Package #386

Closed
dc7303 opened this issue Aug 7, 2022 · 3 comments · Fixed by #963
Closed

Collect Worker Count Metric that Runs Through the Background Package #386

dc7303 opened this issue Aug 7, 2022 · 3 comments · Fixed by #963
Assignees
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers

Comments

@dc7303
Copy link
Member

dc7303 commented Aug 7, 2022

What would you like to be added:

func (b *Background) AttachGoroutine(f func(ctx context.Context)) {

I think you can try to collect the count of workers running in the background package.

Why is this needed:
You can know ahead of time when to process many workers. This can prevent problems that may arise from this.

@dc7303 dc7303 added enhancement 🌟 New feature or request discussion 💭 Need to be discussed labels Aug 7, 2022
@hackerwins
Copy link
Member

Thank you for reporting. It would be helpful to examine these metrics. Feel free to submit a PR.

@hackerwins hackerwins added the good first issue 🐤 Good for newcomers label Jul 15, 2023
@hackerwins hackerwins removed the discussion 💭 Need to be discussed label Jul 4, 2024
@hackerwins hackerwins moved this to Backlog in Yorkie Project - 2024 Jul 23, 2024
@krapie krapie changed the title How about collecting a worker count metric that runs through the background package? Collect Worker Count Metric that Runs Through the Background Package Jul 23, 2024
@kokodak
Copy link
Member

kokodak commented Jul 23, 2024

I'm interested in this issue, would the following rough approach be correct?

  1. create a counter in the AttachGoroutine() method to record when the goroutine starts or ends.
  2. collect counter metrics to show a monitoring tool like Prometheus how many goroutine workers are running in the background.

@krapie
Copy link
Member

krapie commented Jul 27, 2024

@kokodak Yes. I will assign you on this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request good first issue 🐤 Good for newcomers
Projects
Status: Done
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants