You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include offending series labels in missing-metric-name push errors
When a pushed series has no __name__ label, the error returned to the
client only said "no metric name label" / "sample missing metric name"
with no indication of which series caused it. Operators had to bisect by
stopping Prometheus instances one by one to find the culprit.
Enrich both user-facing push paths so the offending series labels are
always included:
- noMetricNameError now carries the series and renders it via
formatLabelSet, matching every sibling validation error in the same
file. This covers the validation (400) path used when metric name
enforcement is enabled.
- The fatal error from tokenForLabels (the shard_by_all_labels=false
path that produced the original 500 with no context) is wrapped with
the series labels.
Fixes#5802
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@
45
45
*[ENHANCEMENT] Ring: Cache `ShuffleShardWithLookback` subrings. The cached entry is invalidated on topology change or once `now` reaches the earliest `RegisteredTimestamp + lookbackPeriod` of any included instance. #7628
46
46
*[ENHANCEMENT] Query Frontend: Rename `time_taken` field to `time_taken_ms` and make it return millisecond count. #7649
47
47
*[ENHANCEMENT] Update prometheus alertmanager version to v0.33.0. #7647
48
+
*[ENHANCEMENT] Distributor: Include the offending series labels in the "sample missing metric name" and "no metric name label" push errors so operators can identify which series is missing a metric name. #7657
48
49
*[BUGFIX] Querier: Fix queryWithRetry and labelsWithRetry returning (nil, nil) on cancelled context by propagating ctx.Err(). #7370
49
50
*[BUGFIX] Metrics Helper: Fix non-deterministic bucket order in merged histograms by sorting buckets after map iteration, matching Prometheus client library behavior. #7380
50
51
*[BUGFIX] Distributor: Return HTTP 401 Unauthorized when tenant ID resolution fails in the Prometheus Remote Write 2.0 path. #7389
0 commit comments