-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(host_metrics source): modify the network
collector to expose TCP stats
#22057
base: master
Are you sure you want to change the base?
Conversation
6efd703
to
32a5fe8
Compare
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.
Thanks @aryan9600 ! Exposing these new metrics seem useful. What do you think of putting them under the existing network
collector though? Exporting as network_tcp_*
.
i wanted to keep it as a separate collector, as these metrics are only available for linux. also, to avoid any changes to the output of users when they upgrade to the newer version with these changes. if its a blocker, then i can move it to the |
I think we already have a precedent of collectors having OS-specific metrics (e.g. |
tcp
collectornetwork
collector to expose TCP stats
39bc32d
to
bdb5596
Compare
network
collector to expose TCP statsnetwork
collector to expose TCP stats
7392558
to
0bcdd70
Compare
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.
Hi @aryan9600, thank you for this PR!
I noticed big change in Cargo.lock
, I wonder if you can roll that file back and apply individual updates for the newly added crates only.
Add a new `tcp` collector to the `host_metrics` source to expose information about the systems's TCP stack. It exposes three metrics: * `tcp_connections_total`: The total number of TCP connections. It includes the `state` of the connection as a tag. * `tcp_tx_queued_bytes_total`: The sum of the number of bytes in the send queue across all connections. * `tcp_rx_queued_bytes_total`: The sum of the number of bytes in the receive queue across all connections. The collector is only enabled for Linux as it uses the netlink subsystem. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
0bcdd70
to
9faccc7
Compare
a problem with having these TCP metrics inside the |
Hi @aryan9600, one test is failing. I will take another look at this PR once that is fixed. You can run any test locally with |
Summary
Modify the
network
collector in thehost_metrics
source to expose information about the systems's TCP stack. It now exposes three metrics:network_tcp_connections_total
: The total number of TCP connections. It includes thestate
of the connection as a tag.network_tcp_tx_queued_bytes_total
: The sum of the number of bytes in the send queue across all connections.network_tcp_rx_queued_bytes_total
: The sum of the number of bytes in the receive queue across all connections.These metrics are only available for Linux systems as it uses the netlink subsystem.
Change Type
Is this a breaking change?
How did you test this PR?
ss -a -t
on both Linux x86 and arm systems.Does this PR include user facing changes?
Checklist
Cargo.lock
), pleaserun
dd-rust-license-tool write
to regenerate the license inventory and commit the changes (if any). More details here.References
closes #21972