Conversation
Generate changelog in
|
| .precision_exact(0) | ||
| .min_value(Duration::from_micros(100)) | ||
| .max_value(Duration::from_secs(10)) | ||
| .build(), |
There was a problem hiding this comment.
I am a bit unsure about what values are appropriate here. This setup gives us 20 buckets with these ranges:
0ns..65.536µs
65.536µs..131.072µs
131.072µs..262.144µs
262.144µs..524.288µs
524.288µs..1.048576ms
1.048576ms..2.097152ms
2.097152ms..4.194304ms
4.194304ms..8.388608ms
8.388608ms..16.777216ms
16.777216ms..33.554432ms
33.554432ms..67.108864ms
67.108864ms..134.217728ms
134.217728ms..268.435456ms
268.435456ms..536.870912ms
536.870912ms..1.073741824s
1.073741824s..2.147483648s
2.147483648s..4.294967296s
4.294967296s..8.589934592s
8.589934592s..17.179869184s
17.179869184s..18446744073.709551615s
The intent is to avoid spamming the metrics infrastructure with a huge number of buckets, while still giving us enough information to go off of. Future polls under 100us or so are in a totally good place and I don't think we really care about splitting those out, and above a few seconds the poll is so unreasonably long the specific length doesn't matter too much.
40698a5 to
145ca6a
Compare
| //! | ||
| //! * `tokio.blocking.threads` (gauge) - The number of threads in Tokio's blocking pool. | ||
| //! * `tokio.blocking.threads.idle` (gauge) - The number of threads in Tokio's blocking pool that are idle. | ||
| //! * `tokio.tasks.polls` (gauge) - The number of individual poll calls to tasks. |
There was a problem hiding this comment.
This is mostly useful to normalize the values of tokio.tasks.poll-duration-bucket into percentages.
|
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
|
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Before this PR
We didn't have any metrics tracking the state of tasks in the Tokio runtime.
After this PR
==COMMIT_MSG==
Added metrics tracking the state of the Tokio runtime.
==COMMIT_MSG==
Unfortunately, many of these rely on unstable Tokio APIs. As a result, you have to opt-in both with the standard
tokio_unstablecfg and atokio_unstableCargo feature in this crate.