mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-20 03:29:05 +02:00
collector: publish base units and _total counter names (#2743)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -107,7 +107,14 @@ exercised a live Windows role.
|
||||
- Preserve metric names, label sets, types, units, defaults and configuration
|
||||
compatibility unless the change intentionally updates that contract. Update
|
||||
the corresponding collector documentation and affected queries together.
|
||||
Follow existing deprecation patterns when replacing published metrics.
|
||||
Replace published metrics with a hard rename: do not keep deprecated copies
|
||||
or aliases, and list the change in `UPGRADE.md`.
|
||||
- Name metrics after the Prometheus conventions: publish base units (seconds,
|
||||
bytes, hertz, ratios from 0 to 1) and put the unit in the name (`_seconds`,
|
||||
`_bytes`, `_hertz`, `_ratio`), never `_mhz`, `_percent`, `_minutes`,
|
||||
`_milliseconds`, `_microseconds`, `_kb` or an `_in_<unit>` infix. Convert
|
||||
Windows values explicitly (MHz, percent, KiB, ms). Counters end in `_total`;
|
||||
gauges never do. List renamed metrics in `UPGRADE.md`.
|
||||
- Determine metric types per counter, using `pdh.Collector.MetricType` where
|
||||
appropriate. Raw PDH values can be cumulative numerators, ticks or counts,
|
||||
even when the Windows counter name says average, percentage or seconds.
|
||||
|
||||
Reference in New Issue
Block a user