feat: add the sparkline bar format, rename bar to gauge - #165
Merged
Conversation
The daemon keeps one system reading per sampler tick for the last ten minutes and reports them on /v1/metrics; the buffer clears on the next engine start and a stopped engine keeps its readings to the stop. remote metrics, fleet metrics and the dashboard draw the readings as a bar, one block glyph per reading with the last point coloured on the 80/90 thresholds; a series with no retained readings falls back to the old drawing, renamed gauge, so a daemon that predates the history renders as it did. The stats Lambda relays the history through unaltered, and the dashboard toggles between the two formats board-wide on g.
The loop reads the cadence on every tick while it has no reading to report, and a daemon with no scrape target never gets one, so the restore ran against a running sampler. Cancel and wait for the sampler to exit first.
At the tile's draw width a 29- or 30-sample window splits unevenly, and the split's rounding can leave the newest reading outside the final pool — so the line and its trailing figure drew one sample behind. The final column now takes the series to its end, which the arithmetic otherwise guarantees.
…s edge cases fleet metrics now draws a node's retained history, a stopped node's history alone, and the per-series gauge fallback, through the command itself; statsFromRemote is checked to relay the history unaltered and to keep an absence an absence. The renderer's tests add the 29-sample-at-tile-width regression, a GPU present in only some samples, a gauge value beyond 100, and a memory reading with no total.
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.
A 0-100% sparkline of the last 10 minutes for each metrics series, selectable as bar; the previous filled-bar drawing survives as gauge.
Summary
Implementation details