Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enhancement(host_metrics source): replace heim with sysinfo in network collector#24818

Open
mushrowan wants to merge 1 commit intovectordotdev:masterfrom
mushrowan:feat/host-metrics-network-sysinfo
Open

enhancement(host_metrics source): replace heim with sysinfo in network collector#24818
mushrowan wants to merge 1 commit intovectordotdev:masterfrom
mushrowan:feat/host-metrics-network-sysinfo

Conversation

@mushrowan
Copy link
Contributor

@mushrowan mushrowan commented Mar 1, 2026

Summary

replace heim::net::io_counters() with sysinfo::Networks in the host_metrics
network collector. first step in removing the unmaintained heim dependency
(#23646). sysinfo is already a dep (used by process.rs)

network_transmit_packets_total now emitted on all platforms (was linux/windows
only). windows tx drops temporarily unavailable since sysinfo doesn't expose
drop counters yet, linux drops preserved via inline sysfs read

Vector configuration

[sources.host_metrics]
type = "host_metrics"
collectors = ["network"]

How did you test this PR?

cargo test -p vector --no-default-features --features sources-host_metrics sources::host_metrics::network

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our
    guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

@mushrowan mushrowan requested a review from a team as a code owner March 1, 2026 11:46
@github-actions github-actions bot added domain: sources Anything related to the Vector's sources domain: ci Anything related to Vector's CI environment labels Mar 1, 2026
@mushrowan mushrowan force-pushed the feat/host-metrics-network-sysinfo branch from fd5bc2a to 46660f8 Compare March 1, 2026 12:08
…ollector

replace heim::net::io_counters() with sysinfo::Networks for network
metrics collection, as part of removing the unmaintained heim
dependency (vectordotdev#23646)

- sysinfo already a dep (used by process.rs), no new dependencies
- network_transmit_packets_total now emitted on all platforms
  (was linux/windows only behind heim IoCountersExt)
- tx drop counters read from sysfs on linux since sysinfo doesn't
  expose them yet (same /sys/class/net dir sysinfo reads from)
- windows tx drops temporarily unavailable, pending upstream sysinfo
- replaces async stream/filter_map chain with simple sync iteration
@mushrowan mushrowan force-pushed the feat/host-metrics-network-sysinfo branch from 46660f8 to 3a386c6 Compare March 1, 2026 12:10
@mushrowan mushrowan changed the title refactor(host_metrics source): replace heim with sysinfo in network collector enhancement(host_metrics source): replace heim with sysinfo in network collector Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: ci Anything related to Vector's CI environment domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant