semgrep: add MeasureSinceWithLabels to FSM time rule (#14812)
Metrics state is local to the server and needs to use time, which is normally forbidden in the FSM code. We have a bypass for this rule for `metrics.MeasureSince` but needed one for `metrics.MeasureSinceWithLabels` as well.
This commit is contained in:
parent
0187240e7c
commit
0e1f8cd803
|
@ -7,6 +7,10 @@ rules:
|
|||
- pattern-not-inside: |
|
||||
defer metrics.MeasureSince(...)
|
||||
|
||||
# Metric state is local to the server and therefore must use time.
|
||||
- pattern-not-inside: |
|
||||
defer metrics.MeasureSinceWithLabels(...)
|
||||
|
||||
# The timetable's whole point is to roughly track timestamps for Raft log
|
||||
# indexes, so it must use time.
|
||||
- pattern-not-inside: |
|
||||
|
|
Loading…
Reference in New Issue