Repository navigation
fix(top): read the H2 flood metric names the detector emits - #1812
Merged
Merged
Conversation
The `sozu top` H2 pane read `h2.flood.violation.{rapid_reset,
made_you_reset,continuation,ping,settings,priority}`, names the H2 flood
detector never emits, so only `glitch_window` could leave zero. Show the
thirteen `h2.flood.violation.*` keys `H2FloodDetector` emits, most severe
first, plus `h2.flood.stream_refused` (#1798), with their trends.
`names::h2` drops the six phantom constants and gains one constant per
emitted key plus `FLOOD_VIOLATION_KEYS`. The detector's metric-key test
now covers the stream-0 WINDOW_UPDATE arm and requires that list to
match the emitted keys exactly; a new `sozu top` test requires the pane
to read only and all of them. `doc/configure.md` lists the missing
`h2.flood.violation.window_update_stream0_window`.
Fixes #1810
Signed-off-by: Florentin Dubois <[email protected]>
…ic-names #1809 added the `h2.flood.violation.window_update_stream0_window` row to doc/configure.md; keep its copy, drop this branch's duplicate, and drop the CHANGELOG sentence that claimed the row. Signed-off-by: Florentin Dubois <[email protected]>
Signed-off-by: Florentin Dubois <[email protected]>
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.
Fixes #1810
What
The
sozu topH2 pane (tab6) readh2.flood.violation.{rapid_reset,made_you_reset,continuation,ping,settings,priority}, names the H2 flood detector never emits, so onlyglitch_windowcould ever leave zero while a mitigation fired. It now reads the thirteenh2.flood.violation.*keysH2FloodDetectoremits, most severe first (a short terminal drops the bottom rows), plush2.flood.stream_refusedfrom #1798, each with its trend sparkline (H2_TRACKED_KEYS).lib/src/metrics/names.rs: the six phantom constants are removed; one constant per emitted key andFLOOD_VIOLATION_KEYSare added. Library API: code importing the removed constants no longer compiles (they named metrics nothing emitted).test_flood_violation_metric_keys_are_unique_and_namespacednow also drives the stream-0 WINDOW_UPDATE arm it missed and asserts the emitted keys equalFLOOD_VIOLATION_KEYS.ctl::top::panes::h2::tests::flood_rows_read_the_emitted_flood_metric_names: everyh2.flood.*row is emitted, every emitted key (andstream_refused) has a row, every row has a trend.snapshot_h2_120x40regenerated: 17 flood-block rows still fit at 120x40.doc/sozu-top.mdH2 row names the real keys; CHANGELOG entry under Fixed.No protocol or security behavior changes: the detector emits exactly what it emitted before; only the TUI and the shared name constants change.
Seen red before the fix
Commands run
cargo +nightly fmt --all -- --check-> exit 0cargo +1.93.1 clippy --all-features --all-targets --locked -- -D warnings-> exit 0cargo +1.93.1 test -p sozu --locked-> 248 passed, 0 failedcargo +1.93.1 test -p sozu --features tui --locked --bin sozu-> 147 passed, 0 failed (thetopmodule is behind thetuifeature)cargo +1.93.1 test -p sozu-lib --lib --all-features --locked-> 1586 passed, 0 failedpython3 .github/scripts/check_doc_citations.py --base origin/main-> exit 0