Skip to content

fix: preserve MetricsQL metric names through value rollups - #628

Closed
zzylol wants to merge 4 commits into
mainfrom
fix/metricsql-readout-labels
Closed

zzylol wants to merge 4 commits into
mainfrom
fix/metricsql-readout-labels

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

MetricsQL value rollups retain metric names, but installed ASAP readouts returned only population labels. A real VictoriaMetrics quantile comparison therefore reported 40 missing and 40 extra series despite acceptable numeric error.

This change reads metric identity from the shared Catalog snapshot for per-entity materializations. Quantile/max readouts retain it; count/rate and other readouts remove it. Logical min/max/avg over an external subquery follow the same MetricsQL rule. PromQL output and spatial reductions retain their existing semantics. Catalog descriptors and summary payloads are not copied.

Before this PR: quantile_over_time(0.9, data[1h]) lost __name__="data" on the ASAP branch.

After this PR: installed MetricsQL value rollups preserve that identity, including inside a composed DAG. Missing catalog identity fails closed. Arithmetic still applies its own label matching and name-removal rules.

Verification: all 1,097 data-plane unit tests passed, including per-entity versus spatial quantile labels and temporal subDAG language differences. The pre-fix mismatch was observed against VictoriaMetrics v1.126.0. A post-fix full process rerun and independent review are pending; this PR makes no performance claim. Behavior follows VictoriaMetrics rollup semantics.

Stacked on #617. This does not add the MetricsQL keep_metric_names modifier or claim full MetricsQL compatibility.

@zzylol
zzylol changed the base branch from feat/univmon-runtime to main September 11, 2026 16:47
@zzylol zzylol closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant