Commit 15997df
committed
Switch prometheus timings to seconds
Date.now() returns milliseconds and startTime is assumed to be a
Date.now() call result too.
In prometheus land, the rule is to always use seconds[1] and not have to
care about the prefixes of units[2]
The vast majority of metric names out there follow that pattern. Instead
of diverging, causing confusions to developers who need to adapt their
heads around naming metric differently as well as setting histogram
buckets differently, conform to the status quo and divide by 1000.
Precision won't be lost as we just move around the decimal separator.
This is a breaking change for applications/services that have migrated
to prometheus, so bump to 3.1.0. Charts and statistics might have to be
updated as well as dashboards.
[1] https://prometheus.io/docs/instrumenting/writing_exporters/#naming
[2] https://www.robustperception.io/who-wants-seconds
Signed-off-by: Alexandros Kosiaris <akosiaris@wikimedia.org>1 parent 3bc8101 commit 15997df
3 files changed
+5362
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
0 commit comments