Repository navigation
Add authored notebook templates for the PostgreSQL-only alert families (#4223) - #4419
Merged
Merged
Conversation
#4223) PostgreSQL Wraparound Risk, PostgreSQL Vacuum Horizon Blocked and PostgreSQL Replication Slot Retention now open an authored notebook instead of the mechanical section-list fallback: header, status, the family's primary reads, and a 24h gauge trend panel. Widens s_authoredLimitlessTrendReads to internal so the shared budget theory can check the exemption set instead of hardcoding one read name.
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.
Refs #4223.
Why
The three PostgreSQL-only alert families — Wraparound Risk, Vacuum Horizon Blocked, and Replication Slot Retention — still opened the mechanical fallback notebook (a plain list of section reads) when an alert fired. This gives each family an authored notebook instead: a header, status, its own drill-down reads, and a 24h trend panel.
What changes
New file
AlertNotebookEndpoint.Templates.Postgres.cs(Darling/PerformanceMonitor.Darling.Service/), three builders registered as one row each ins_authoredTemplates:authored/pg-wraparoundget_pg_wraparound_risk,get_pg_autovacuum_health(limit 20), 24h trend ofpg_xids_remaining(min), database-filteredauthored/pg-xmin-horizonget_pg_xmin_horizon,get_pg_session_states(limit 25), 24h trend ofpg_xmin_age(max), no database filter —pg_xmin_horizon's only dimension issourceauthored/pg-replication-slotget_pg_replication_slots,get_pg_replication_stats(limit 25), 24h trend ofpg_slot_retained_wal_bytes(max), database-filteredEach family's second read is the mechanical map's own second section for that metric (
DarlingTriageEndpoint.cs), carried forward as an authored read cell.The three primary reads (
get_pg_wraparound_risk,get_pg_xmin_horizon,get_pg_replication_slots) declare nolimitparam in their catalog entry, so they're added tos_authoredLimitlessTrendReadsalongsideget_deadlock_trend. That set wasprivate; widened tointernalso the shared budget theory (AlertNotebookAuthoredTemplateTests.Budget_ReadCellsHaveLimitsExceptTheTrendRead...) checks membership in the real exemption set instead of hardcodingget_deadlock_trendby name — that hardcode would have false-failed on this PR's reads, so the shared test now generalizes correctly for any future exempt read too.A new
PgGaugeTimelinePanelhelper (distinct from the sharedTimelinePanel) builds the 24h gauge trend: noannotationskey and a caller-supplied aggregate, since none of these three sources are per-event/count measures with a catalog annotation source —TimelinePanelhard-codesaggregate: "count"and always attaches an annotation, which doesn't fit a gauge.Darling.Tests/AlertNotebookTemplatePostgresTests.cs(new, 9 tests): routing for all three metrics, the exact cell list/types/reads/params/trend source-measure-aggregate per family, and a no-matched-incident degrade (same cell count) for each. The shared theories inAlertNotebookAuthoredTemplateTests(data-driven off the registration table) already cover validation, dispatch, compose-catalog, budget, binding and viz for these three metrics with no edits needed there beyond the exemption-set generalization above.Test plan
origin/dev(5899b85): all 9 new tests fail —AuthoredTemplate(metric)returns null for all three metrics (no row registered), so.Valueon the null result throws.AlertNotebookTemplatePostgresTests9/9,AlertNotebookAuthoredTemplateTests56/56,AlertNotebookEndpointTests29/29,DocCommentHygieneTests77/77 — all run in-process on macOS (pure, no live PG needed).Darling.Tests.csprojandLite.Tests.csprojboth build 0 errors (-p:EnableWindowsTargeting=true); both targetnet10.0-windowsand can't run here — CI decides them.CHANGELOG entry
SECTION: Added
ENTRY:
REF:
[Add authored notebook templates for the PostgreSQL-only alert families (#4223) #4419]: Add authored notebook templates for the PostgreSQL-only alert families (#4223) #4419