Commit f969221
committed
metric: permit counter resets in update assertion
When we call `Update` on counter metrics, we have an assertion that
panics in tests if the counter is set to a lower value than the prior
update. In practice, counters are permitted to reset and 3rd party
metric systems expect this to happen occasionally. The assertion logic
is adjusted to permit a setting of zero when the value is lower.
Resolves: #154364
Resolves: #154365
Resolves: #154366
Resolves: #154367
Resolves: #154368
Epic: None
Release note: None1 parent 52aaf2e commit f969221
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
1449 | | - | |
| 1449 | + | |
1450 | 1450 | | |
1451 | 1451 | | |
1452 | 1452 | | |
| |||
0 commit comments