vendor: update metrics package with fix unsupported metric type for summary (#10745)

Fix `unsupported` metric type display in exposed metric metadata for
summaries and quantiles by bumping `metrics` SDK version.

This `unsupported` type exists when a summary is not updated within a
certain time window. See https://github.com/VictoriaMetrics/metrics/issues/120 and pull
request https://github.com/VictoriaMetrics/metrics/pull/121 for details.

Signed-off-by: Zhu Jiekun <jiekun@victoriametrics.com>
Signed-off-by: Max Kotliar <kotlyar.maksim@gmail.com>
Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
This commit is contained in:
Zhu Jiekun
2026-04-03 21:06:47 +08:00
committed by GitHub
parent 71af1ee5f1
commit 4438454567
7 changed files with 15 additions and 18 deletions

View File

@@ -31,6 +31,7 @@ See also [LTS releases](https://docs.victoriametrics.com/victoriametrics/lts-rel
* FEATURE: [vmctl](https://docs.victoriametrics.com/victoriametrics/vmctl/): add dedicated `thanos` mode for [migrating data from Thanos](https://docs.victoriametrics.com/victoriametrics/vmctl/thanos/). This mode supports both raw and downsampled Thanos blocks, including all aggregate types (count, sum, min, max, counter). Each aggregate is imported as a separate metric with resolution and aggregate type suffixes (e.g., `metric_name:5m:count`). The new mode uses `--thanos-*` prefixed flags: `--thanos-snapshot`, `--thanos-concurrency`, `--thanos-filter-time-start`, `--thanos-filter-time-end`, `--thanos-filter-label`, `--thanos-filter-label-value`, and `--thanos-aggr-types`. See [#9262](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9262).
* BUGFIX: [vmbackup](https://docs.victoriametrics.com/vmbackup/), [vmbackupmanager](https://docs.victoriametrics.com/victoriametrics/vmbackupmanager/): retry the requests that failed with unexpected EOF due to unstable network to S3 service. See [#10699](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10699).
* BUGFIX: All VictoriaMetrics components: Fix an issue where `unsupported` metric metadata type was exposed for summaries and quantiles if a summary wasn't updated within a certain time window. See [metrics#120](https://github.com/VictoriaMetrics/metrics/issues/120) and [metrics#121](https://github.com/VictoriaMetrics/metrics/pull/121).
## [v1.139.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.139.0)

2
go.mod
View File

@@ -10,7 +10,7 @@ require (
github.com/VictoriaMetrics/VictoriaLogs v0.0.0-20260218111324-95b48d57d032
github.com/VictoriaMetrics/easyproto v1.2.0
github.com/VictoriaMetrics/fastcache v1.13.3
github.com/VictoriaMetrics/metrics v1.43.0
github.com/VictoriaMetrics/metrics v1.43.1
github.com/VictoriaMetrics/metricsql v0.86.0
github.com/aws/aws-sdk-go-v2 v1.41.1
github.com/aws/aws-sdk-go-v2/config v1.32.8

4
go.sum
View File

@@ -58,8 +58,8 @@ github.com/VictoriaMetrics/easyproto v1.2.0 h1:FJT9uNXA2isppFuJErbLqD306KoFlehl7
github.com/VictoriaMetrics/easyproto v1.2.0/go.mod h1:QlGlzaJnDfFd8Lk6Ci/fuLxfTo3/GThPs2KH23mv710=
github.com/VictoriaMetrics/fastcache v1.13.3 h1:rBabE0iIxcqKEMCwUmwHZ9dgEqXerg8FRbRDUvC7OVc=
github.com/VictoriaMetrics/fastcache v1.13.3/go.mod h1:hHXhl4DA2fTL2HTZDJFXWgW0LNjo6B+4aj2Wmng3TjU=
github.com/VictoriaMetrics/metrics v1.43.0 h1:mtzzl30hG28FtrsqfffKgtf5X3I8CdYCuToSr/bHw6M=
github.com/VictoriaMetrics/metrics v1.43.0/go.mod h1:xDM82ULLYCYdFRgQ2JBxi8Uf1+8En1So9YUwlGTOqTc=
github.com/VictoriaMetrics/metrics v1.43.1 h1:j3Ba4l2K1q3pkvzPqt6aSiQ2DBlAEj3VPVeBtpR3t/Y=
github.com/VictoriaMetrics/metrics v1.43.1/go.mod h1:xDM82ULLYCYdFRgQ2JBxi8Uf1+8En1So9YUwlGTOqTc=
github.com/VictoriaMetrics/metricsql v0.86.0 h1:IFD08amp+nkW6I+pB3+iyamewkIrbEojkQP4cmEbwkU=
github.com/VictoriaMetrics/metricsql v0.86.0/go.mod h1:d4EisFO6ONP/HIGDYTAtwrejJBBeKGQYiRl095bS4QQ=
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=

View File

@@ -25,7 +25,11 @@ import (
type namedMetric struct {
name string
metric metric
isAux bool
// isAux indicates whether it is an auxiliary metric.
// Currently only set for quantileValue, as it is part of the Summary.
// This field affects sorting when quantileValue and Summary are compared.
isAux bool
}
type metric interface {

View File

@@ -47,12 +47,10 @@ func (s *Set) WritePrometheus(w io.Writer) {
return fName1 < fName2
}
// Only summary and quantile(s) have different metric types.
// Sorting by metric type will stabilize the order for summary and quantile(s).
mType1 := s.a[i].metric.metricType()
mType2 := s.a[j].metric.metricType()
if mType1 != mType2 {
return mType1 < mType2
// if both has same family, check the auxiliary first.
// only summary quantile(s) is registered as auxiliary, and quantile(s) in summary should go first.
if s.a[i].isAux != s.a[j].isAux {
return s.a[i].isAux
}
// lastly by metric names, which is for quantiles and histogram buckets.

View File

@@ -120,13 +120,7 @@ func (sm *Summary) marshalTo(prefix string, w io.Writer) {
}
func (sm *Summary) metricType() string {
// this metric type should not be printed, because summary (sum and count)
// of the same metric family will be printed after quantile(s).
// If metadata is needed, the metadata from quantile(s) should be used.
// quantile will be printed first, so its metrics type won't be printed as metadata.
// Printing quantiles before sum and count aligns this code with Prometheus behavior.
// See: https://github.com/VictoriaMetrics/metrics/pull/99
return "unsupported"
return "summary"
}
func splitMetricName(name string) (string, string) {

2
vendor/modules.txt vendored
View File

@@ -142,7 +142,7 @@ github.com/VictoriaMetrics/easyproto
# github.com/VictoriaMetrics/fastcache v1.13.3
## explicit; go 1.24.0
github.com/VictoriaMetrics/fastcache
# github.com/VictoriaMetrics/metrics v1.43.0
# github.com/VictoriaMetrics/metrics v1.43.1
## explicit; go 1.24.0
github.com/VictoriaMetrics/metrics
# github.com/VictoriaMetrics/metricsql v0.86.0