Commit 777669e
authored
Fix trimmed labels being used in other metrics, due to shallow copy (#4588)
This addresses the errors on b/384820142
The main issue is that, in _MetricsRecorder, trimmed_labels was a
shallow copy for self._labels, which had job removed, thus causing many
utask duration with different jobs to reduce to the same labels
(deduplication seems to only take into account the labels declared in
monitoring_metrics.py)
The other error is related to saturation, where time series would be
written too often. This probably happens due to the loss of the job
label, causing many requests to a subset of the original labels. It can
possibly go away once this lands, otherwise more investigation is
needed.1 parent 568cb55 commit 777669e
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
181 | 184 | | |
182 | | - | |
183 | | - | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
0 commit comments