Commit 765ce10
committed
Switch prometheus timings to seconds #2
This effectively reverts commit
844fe44, whose parent was mistakenly
pushed instead of being merged as a PR. Below is the original PR
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-seconds1 parent 844fe44 commit 765ce10
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