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 helper functions to the histogram for easier mapping between bucket and time #7033

Open
0xdeafbeef opened this issue Dec 13, 2024 · 0 comments
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request.

Comments

@0xdeafbeef
Copy link
Contributor

pub(crate) fn bucket_range(&self, bucket: usize) -> std::ops::Range<u64> {

Currently, the only way to map tokio histogram measurements back to duration is to copy-paste bucket_range to your project and parse histogram params from dbg!(&LogHistogram).

Use case

When exporting tokio metrics to monitoring systems (like Prometheus), we need to know what duration ranges each bucket represents.

@0xdeafbeef 0xdeafbeef added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request.
Projects
None yet
Development

No branches or pull requests

1 participant