[ai-assisted=yes] Emit disk read/write operation counts - #343
Conversation
|
|
0a6397e to
39f807c
Compare
There was a problem hiding this comment.
Thanks for contributing. LGTM in general. Once you have signed the CLA we can go forward with this.
go test currently fails:
go test ./...
...
[FAILED] Expected
<int>: 144
to equal
<int>: 126
In [It] at: /Users/myuser/Workspace/public/cloudfoundry/system-metrics-release/src/cmd/system-metrics-agent/app/system_metrics_agent_test.go:122 @ 09/15/26 08:07:49.52
AFAICS /tmp/expected-metrics in scripts/integration-tests.sh also needs your new metrics.
Please also disclose AI usage (if any).
fb16e92 to
2274b04
Compare
|
Thanks @jorbaum , I have addressed your comment. |
ay901246
left a comment
There was a problem hiding this comment.
Just need to sign the CLA; small nit is that you may want to remove the TNZ ticket title since it's not technically relevant to open source.
|
@ay901246 thanks, I have removed the ticket from the title |
There was a problem hiding this comment.
Thanks. LGTM.
Ah. One last thing: The documentation at https://github.com/cloudfoundry/system-metrics-release/blob/main/docs/system-metrics-agent.md is missing the new metrics. it looks to me like you need to add them there as well.
DiskIOCountersWithContext's underlying gopsutil call already returns
ReadCount/WriteCount per disk device; the collector read every other
field off that struct but silently dropped these two. Wires them
through DiskStat and emits them as system_disk_{system,ephemeral,
persistent}_{read,write}_count gauges, alongside the existing byte
counters.
Ref: TNZ-145560
2274b04 to
8bacfe2
Compare
|
@jorbaum I added to docs, thank you. |
|
Hey @jorbaum what needs to be done now so a GH release is made with this? |
Adds
system_disk_{system,ephemeral,persistent}_{read,write}_countgauges alongside the existing byte-throughput gauges.There's currently no IOPS metric, only bytes/sec. gopsutil's
disk.IOCountersStatalready returnsReadCount/WriteCountper device; the collector just wasn't reading them.Testing Done
system_disk_persistent_read_countsystem_disk_persistent_write_countAlso checked the
system/ephemeraldisk gauges on VM 1, all live and moving:system_disk_system_read_countsystem_disk_system_write_countsystem_disk_ephemeral_read_countsystem_disk_ephemeral_write_count