Skip to content

change the order of summary and quantile(s)#105

Merged
hagen1778 merged 2 commits into
masterfrom
bug/metadata-seq
Sep 23, 2025
Merged

change the order of summary and quantile(s)#105
hagen1778 merged 2 commits into
masterfrom
bug/metadata-seq

Conversation

@jiekun
Copy link
Copy Markdown
Member

@jiekun jiekun commented Sep 16, 2025

This is a follow-up to #99.

Prior to #99, the order of summary metrics (_sum and _count) and quantiles could vary depending on the metric name.

After #99, the order was fixed to show summaries first, followed by quantiles. This ordering was based on the author's tests, but at the time, the author was unaware that different orders were possible.

In conclusion:

  1. The order should be fixed, which was accomplished in the previous pull request.
  2. The fixed order should match Prometheus or the most common ordering from versions before Fix metadata display for summary and empty record metrics #99.
    • The current version (v1.40.1) fixed this order in an unusual way.

Therefore, this pull request modifies the sorting logic for summaries and quantiles, enforcing that quantiles are printed first, followed by summaries.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.58%. Comparing base (5fb241f) to head (c1cbd70).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #105   +/-   ##
=======================================
  Coverage   87.58%   87.58%           
=======================================
  Files          12       12           
  Lines        1643     1643           
=======================================
  Hits         1439     1439           
  Misses        153      153           
  Partials       51       51           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@jiekun
Copy link
Copy Markdown
Member Author

jiekun commented Sep 16, 2025

@makasim I re-think about using metricType() for sorting, and want to stick to this way, to avoid adding new function for interface metrics. See: #99 (comment)

And my point here is that, only Summary (and quantiles) need this sorting function, and if new function added for the metric interface, this function is not useful for other implementations, except Summary and quantiles.

@jiekun jiekun marked this pull request as ready for review September 16, 2025 07:26
@makasim
Copy link
Copy Markdown
Member

makasim commented Sep 16, 2025

@makasim I re-think about using metricType() for sorting, and want to stick to this way, to avoid adding new function for interface metrics. See: #99 (comment)

I am fine with it. Just make sure it is properly commented. So we won't forget these details in a month.

Comment thread summary.go
Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
@hagen1778 hagen1778 merged commit afb141d into master Sep 23, 2025
7 checks passed
@hagen1778 hagen1778 deleted the bug/metadata-seq branch September 23, 2025 10:27
hagen1778 added a commit to VictoriaMetrics/VictoriaMetrics that referenced this pull request Sep 30, 2025
Restore sorting order of summary and quantile metrics exposed by VictoriaMetrics components on `/metrics` page.

VictoriaMetrics/metrics#105
Signed-off-by: hagen1778 <roman@victoriametrics.com>
hagen1778 added a commit to VictoriaMetrics/VictoriaLogs that referenced this pull request Sep 30, 2025
Restore sorting order of summary and quantile metrics exposed by VictoriaLogs components on `/metrics` page.

VictoriaMetrics/metrics#105
hagen1778 added a commit to VictoriaMetrics/VictoriaTraces that referenced this pull request Sep 30, 2025
Restore sorting order of summary and quantile metrics exposed by VictoriaTraces components on `/metrics` page.

VictoriaMetrics/metrics#105
jiekun pushed a commit to VictoriaMetrics/VictoriaTraces that referenced this pull request Sep 30, 2025
Restore sorting order of summary and quantile metrics exposed by VictoriaTraces components on `/metrics` page.

VictoriaMetrics/metrics#105
hagen1778 added a commit to VictoriaMetrics/VictoriaMetrics that referenced this pull request Oct 1, 2025
Restore sorting order of summary and quantile metrics exposed by
VictoriaMetrics components on `/metrics` page.

VictoriaMetrics/metrics#105

Signed-off-by: hagen1778 <roman@victoriametrics.com>
hagen1778 added a commit to VictoriaMetrics/VictoriaMetrics that referenced this pull request Oct 1, 2025
Restore sorting order of summary and quantile metrics exposed by
VictoriaMetrics components on `/metrics` page.

VictoriaMetrics/metrics#105

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit cd52978)
@rtm0
Copy link
Copy Markdown

rtm0 commented Oct 7, 2025

The bugfix was included in v1.127.0, v1.110.20 and v1.122.5.

@valyala
Copy link
Copy Markdown
Contributor

valyala commented Oct 8, 2025

The bugfix has been included in VictoriaLogs v1.36.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants