refactor(overview): aggregate KPI tiles server-side + retire dead template config - #98
Merged
Merged
Conversation
…plate config Overview KPI tiles (e.g. "General services · RPM / Latency / SLA") aggregated over only a single service instead of the whole layer (a hardcoded topN:1), so a busy layer read far too low. The tiles now roll up the ENTIRE layer server-side via sum/avg(top_n(...)) — throughput summed, latency/SLA averaged — across General, Mesh, and the Virtual Database / Cache / MQ / GenAI layers, in one query per tile instead of a per-service fan-out. The K8s-cluster and Istio-pilot composites stay page-side (their latest()/labeled metrics can't be top_n-rolled) behind an explicit `aggregateOnPage` widget flag; the top_n window is bounded by a new HORIZON_QUERY_OVERVIEW_TOPN knob (default 100). Mesh's second tile is now Latency (avg response time) in place of the old P95. Also retires the now-dead legacy per-layer-overview machinery (LayerOverviewConfig / headerColumns / overviewGroups / overviewMetrics) — the standalone Overview dashboards replaced it — plus a sweep of verified-dead template config (serviceCountTile, the LayerDef.header twin, LogConfig.defaultTags, LandingConfig.style, LandingColumn.tip, OverviewWidgetResult, the BFF LayerMetricsConfig alias) and dead loader migrations. No layer-template or OAP wire-contract change; the tested `widgets` fallback + live component normalizers are kept.
…ggles
The Overview widget editor showed the raw `{{topn}}` placeholder in the KPI MQE field with no explanation. Add an ⓘ hint next to the MQE label that spells out what the variable is — the layer-wide top-N window the BFF substitutes at query time — and shows its live resolved value (`HORIZON_QUERY_OVERVIEW_TOPN`, surfaced via /api/oap/info). The "Show service count" and "Aggregate on page" toggles now share one row (density). Documents HORIZON_QUERY_OVERVIEW_TOPN in the container-image env-var reference.
…en-label toggles
The {{topn}} hint used a native `title` attribute — slow, unstyled, and dead on click (the exact anti-pattern WidgetTip was built to replace). Switch to WidgetTip so the tip shows a real styled popover on hover AND click/focus. Also lay the toggle rows out as checkbox-then-words (was label-stacked-above-checkbox).
Member
Author
|
Synced the two updated Overview templates into the public demo OAP so the fix is live there for review:
Verified the demo now serves the self-aggregating MQE (e.g. Note for other deployments: because Overview templates are served remote-only from OAP, existing installs need the same one-time re-sync (Overview-templates admin → push-bundled) for the fix to take effect; fresh installs get it via the boot seed. |
…der alias; clearer editor labels Review follow-ups on the overview KPI aggregation: - P2: the overview batched landing calls by layer and used the MAX `limit` across that layer's page-aggregated widgets, so two same-layer widgets with limits 1 and 5 were both computed over 5. Group landing calls by (layer, page-limit) so each keeps its own window. No change for the bundled dashboards (one limit per layer). - P3: the loader stopped falling back to the legacy top-level `metrics` block for the layer header — custom/legacy templates using it would lose their header columns. Restore the `metrics`->header alias (still documented on LayerDef.metrics). - P1 (not a bug): documented WHY the self-aggregating fragment's `entity: normal:true` is safe for VIRTUAL_* layers whose services are normal:false — `top_n` is a cross-entity scan that ignores the query entity's normal flag; verified identical results with normal:true/false against the demo. - Editor: drop the "(fan-out)" jargon from the Aggregate-on-page toggle; add tips explaining the page-side mode and that "Top-N services" ranks by the first KPI's metric (a BFF-side sort, not a separate top_n MQE).
…selector The Source <select> shipped two "mqe" options — one `:value="undefined"` (a hack for KPIs with no explicit source) and one `value="mqe"` — so the dropdown listed "mqe" twice. Bind the select to `k.source ?? 'mqe'` with an @change writer instead, leaving a single mqe / service-count pair.
…ion mode redesign
Page-side (`aggregateOnPage`) tiles ranked the top-N services by the FIRST KPI, hardcoded — which mis-ranks when that KPI is a LABELED_VALUE metric (e.g. Istio pilot's xDS pushes). Add a `rankBy` config: `{ kpi: <index> }` to rank by another KPI, or `{ mqe: "<expr>" }` to rank by a metric not shown as a KPI. `pilot_summary` now ranks by xDS connections (a REGULAR_VALUE) instead of the labeled pushes.
Client: each page-side widget now gets its own landing call carrying its own `limit` AND ranking (self-aggregating tiles still batch by layer). This also subsumes the earlier per-(layer,limit) grouping. `rankBy.mqe` appends a ranking-only column (probed + sorted on, never displayed).
Editor: redesign the aggregation controls as an explicit **Server-side / Page-side** mode radio; the page-side params (Top-N services + Rank by) nest under it and appear only when Page-side is chosen. "Rank by" is one dropdown of the widget's KPIs + "a separate metric" (no redundant "first KPI" option). Also fixes the duplicate "mqe" option in the KPI Source selector.
The Dashboard-meta Description field was a fixed-height textarea, so a multi-line description clipped (the tail hidden below the box). Apply the existing `v-autosize` directive so it grows to fit its content — on the edit drawer's meta panel and the new-dashboard modal. Same field, same behaviour in both places.
wankai123
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Overview KPI tiles (e.g. General services · RPM / Latency / SLA) were aggregating over only a single service instead of the whole layer — a hardcoded
topN:1— so a busy layer read far too low. Surfaced in apache/skywalking#13934 ("service metrics specific to a particular service rather than the entire system").What
1 — Overview KPI aggregation (the fix)
sum/avg(top_n(<metric>,{{topn}},DES[,attr0='<layer>'])), in one query per tile instead of a per-service fan-out (≈N× fewer OAP evals on a refreshing landing page).latest()snapshots + the label-splitxds_pushescan't betop_n-rolled).{{topn}}is bounded by a newHORIZON_QUERY_OVERVIEW_TOPN(default 100).2 — Page-side aggregation is now a first-class, per-widget choice
top_n-sniff. Page-side widgets carry their ownlimit(top-N services) and, new here, arankBy— rank the top-N by one of the widget's KPIs (default the first) or by a separate ranking metric ({ "kpi": n } | { "mqe": "…" }). Fixes a latent bug where a page-side widget's first KPI being aLABELED_VALUEmetric (Istio pilot'sxds_pushes) skewed the ranking;pilot_summarynow ranks by xDS connections.limit+ ranking); self-aggregating tiles still batch by layer.3 — Editor UX
{{topn}}is explained inline via aWidgetTippopover showing its live resolved value (surfaced through/api/oap/info).4 — Cleanup (no behavior change)
LayerOverviewConfig/headerColumns/overviewGroups/overviewMetrics) — the standalone Overview dashboards replaced it.serviceCountTile, theLayerDef.headertwin,LogConfig.defaultTags,LandingConfig.style,LandingColumn.tip,OverviewWidgetResult, the BFFLayerMetricsConfigalias) + dead loader migrations. No layer-template or OAP wire-contract change — only the two Overview dashboard templates (services.json,mesh.json) + their i18n overlays changed.Rollout — Overview templates need an OAP re-sync
Overviews are served remote-only from OAP (the disk bundle is a seed, not a render-time source). Fresh installs get the change via boot-seed; an existing deployment needs an admin re-sync of the bundled Overview templates (Overview-templates admin → push-bundled). The public demo has already been synced for the aggregation fix.
Validation
i18n:validate— all green.selfAggregate+ page-side fan-out) confirmed; the rank-by mechanism proven on a multi-service layer (ranking by a separate metric changes the top-N selection + aggregate);top_nshown to ignore the entitynormalflag (sonormal:trueis safe for thenormal:falseVIRTUAL_* layers).rankBypayload assembly is type-checked + traced but not exercised in the live UI.