Repository navigation
fix(kpi): show a dash, not zero, when the platform keeps no totals - #82
Merged
Merged
Conversation
On a platform with per-module metrics off, the request and error-rate tiles read "0" and "0.00%" over live traffic. They sum the per-module rows in `metrics`, and that frame is empty when nothing is aggregated, so an unknown became a confident zero. Seen live on quickstart under a 3,000-request burst. - The tiles read the `ready` ack the way the module table already does: recording off first, then metrics off, then not reported. In each case they show a dash and name the reason - Metrics on with no rows still shows 0, because that is true. Rows that did arrive are always shown, since the setting can change after the ack - Not replaced with `summary.count`: it is capped by the ring capacity and reads lower the busier the platform is. The summary trend lines stay - 7 scenarios replay the protean, Spring and Go connect sequences. With the old tiles, 4 of them fail; the other 3 guard what must not change Closes #81 Tags: #kpi #honesty Co-Authored-By: htjulia <htjulia1@gmail.com>
Checked live on quickstart with metrics off. Appending the reason to the sub-line wrapped the requests tile onto a second line, so it stood taller than the rest of the row. The reason now sits where the unit would, after a non-breaking space, and the sub-lines say what they always said. Tags: #kpi Co-Authored-By: htjulia <htjulia1@gmail.com>
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.
Closes #81
Why
On a platform with per-module metrics off (
protean.trace.metrics.enabled=false, the quickstart default), the KPI row showedRequests · total 0andError rate 0.00%while traffic was flowing. I saw this live on 2026-10-12 against quickstart during a 3,000-request burst. The platform reports the situation correctly: itsreadyack saysmetricsEnabled: false, and itsmetricsframes are[]. The two tiles summed that empty array and turned "not aggregated" into a confident zero. The module table already reads the ack (#63); the tiles didn't.What
The two tiles now follow the module table's ack-driven reading, checked in the same order:
metricshas rowstracesEnabled: false—and "recording off"metricsEnabled: false—and "metrics off"metricsEnabled: true0here is a true zero—and "not reported"tracesEnabledis checked first.metricsEnabledis the effective value, so turning recording off also reports metrics as off, and "metrics off" would point the operator at the wrong switch.The tiles do not fall back to
summary.count. That count is capped by the ringcapacity(measured: 340 requests reported as 200), so it would understate traffic more the busier the platform is. Thesummarytrend lines (vs prev,err) stay as they are.The reason sits where the unit would (
— metrics off), so each tile stays one line tall and its sub-line is unchanged.The helper is private to
kpi-row.tsx, so the file adds no lint warning.Verification
kpi-row.tsxput back, 4 of the 7 fail. The other 3 cover behaviour that has to stay the same: a true zero, rows shown despite an "off" ack, and Go sending rows.ready:tracesEnabled: true,metricsEnabled: false,metrics: []) and about 650/items/addrequests:— metrics off, matching the module table's "Module metrics are off".summarysub-lines still show (↓ 67% vs prev,— 0.00pp · 0 err).