Skip to content

rapl: fix enable-zone-label flag help text - #3855

Open
manunicholasjacob wants to merge 1 commit into
prometheus:masterfrom
manunicholasjacob:rapl-zone-label-help
Open

manunicholasjacob wants to merge 1 commit into
prometheus:masterfrom
manunicholasjacob:rapl-zone-label-help

Conversation

@manunicholasjacob

Copy link
Copy Markdown

@SuperQ The help text of --collector.rapl.enable-zone-label was copied from the systemd collector ("Enables service unit metric unit_start_time_seconds"), so --help misdescribes the flag. This changes it to describe what the flag does: a single node_rapl_joules_total metric with a rapl_zone label instead of one metric per zone.

How tested: gofmt -l collector/ clean, go vet ./collector/... clean, make test passes (go1.26.0, WSL2). Built the binary and checked --help, and scraped the rapl collector against collector/fixtures/sys with and without the flag to confirm the new text matches the output (node_rapl_core_joules_total / node_rapl_package_joules_total without it, node_rapl_joules_total{rapl_zone="core|package"} with it).

AI disclosure: I used Claude Code to help prepare this change; I reviewed the diff and the test output.

The help text of --collector.rapl.enable-zone-label was copied from the
systemd collector's --collector.systemd.enable-start-time-metrics flag.
Describe what the flag actually does: expose node_rapl_joules_total with
a rapl_zone label instead of one metric per zone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Manu Nicholas Jacob <manunicholasjacob@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant