Correct way for measure connections counter #3346
Unanswered
dayvejones
asked this question in
Q&A
Replies: 1 comment
-
That looks correct to me. Don't know about the idle state. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I have a need to measure the number of open connections (http1) and If I understand correctly, axum/hyper don't have built-in tools for measuring the number of connections.
I took this example - https://github.com/tokio-rs/axum/blob/main/examples/serve-with-hyper/src/main.rs
and added gauge! increment/decrement
Next I read these metrics along with the other prometheus metrics for Grafana, like this - https://github.com/tokio-rs/axum/blob/main/examples/prometheus-metrics/src/main.rs
Is this approximately the correct way to measure? And is there still a way to determine which connections have the "idle" state?
axum version
0.8.4
Beta Was this translation helpful? Give feedback.
All reactions