-
Notifications
You must be signed in to change notification settings - Fork 184
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 for FUSE worker idle and total count #1264
Add metrics for FUSE worker idle and total count #1264
Conversation
Signed-off-by: Daniel Carl Jones <[email protected]>
8141cfd
to
df4b665
Compare
|
||
let new_count = old_count + 1; | ||
let idle_worker_count = self.state.idle_worker_count.fetch_add(1, Ordering::SeqCst) + 1; | ||
metrics::gauge!(METRIC_NAME_FUSE_WORKERS_TOTAL).set(new_count as f64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also be set in start
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is set when start
is called, since start
will invoke this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Before this change, there was no visibility into how many FUSE worker threads within Mountpoint had been created nor any indication if they are all busy or not.
This change adds both a count for the number of FUSE worker threads that have been spawned, as well as a count measuring how many are currently considered idle.
With the current metric implementation, these are guages and are only emitted when the value is updated. They are emitted in the logs as follows:
Does this change impact existing behavior?
This adds a new metric only.
Does this change need a changelog entry? Does it require a version change?
No, new metric only. Metrics aren't advertised as a stable feature.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).