Port baseline engine and anomaly detection to Dashboard#793
Merged
erikdarlingdata merged 3 commits intodevfrom Apr 7, 2026
Merged
Port baseline engine and anomaly detection to Dashboard#793erikdarlingdata merged 3 commits intodevfrom
erikdarlingdata merged 3 commits intodevfrom
Conversation
Changes across Dashboard, Lite, and InstallerGui: - ForegroundDimColor now matches ForegroundColor in all 6 themes - InstallerGui ForegroundMutedBrush changed to foreground color - ScottPlot chart text colors (#9DA5B4, #4A5568, #364D61) replaced with foreground equivalents (#E4E6EB, #1A1D23, #1A2A3A) - SlicerLabelBrush changed from 60% opacity to full opacity - Email template text changed from #808080 to #E4E6EB - Removed Opacity="0.45" from empty-state icons in ServerTab Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 1-3 of the baselines plan for Lite: Engine: - BaselineProvider: 30-day rolling baselines bucketed by hour-of-day x day-of-week with bucket collapse (full → hour-only → flat) and hysteresis (10/15 thresholds) - Restart poisoning exclusion for cumulative metrics (batch requests, wait stats, query duration) using QUALIFY + LAG heuristic in DuckDB - 4 existing anomaly detectors upgraded from flat 24h lookback to time-bucketed - 4 new detectors: batch requests/sec, session counts, query duration, memory - Per-metric configurable deviation thresholds (default 2σ) - Proportional stddev floor (max(stddev, mean*0.01)) for division-by-zero - Fix BigInteger cast error on DuckDB SUM() for session/query duration detectors MCP: - analyze_server: baseline context in anomaly findings output - compare_analysis: updated description noting time-bucketed baselines - Anomaly fact metadata includes baseline_hour, baseline_dow, baseline_tier UI (Overview tab): - Baseline bands (mean ± 2σ) on CPU, Wait Stats, I/O Latency, Blocking lanes - Red anomaly dots for values outside band (with absolute minimum thresholds) - Tooltip ▲/▼ indicators (colored red/green) for anomalous values - "Compare to" dropdown: overlay yesterday/last week as dashed ghost lines - Right-side value labels removed, charts expanded to full width - Memory lane renamed to "Buffer Pool MB" - Blocking/Deadlocks shown on separate lines in tooltip Tests: - 15 BaselineProvider tests (buckets, collapse, hysteresis, restart poisoning, division-by-zero, cache, server isolation, memory) - 10 AnomalyDetector tests (all new detectors, per-metric thresholds, metadata) - 257/257 total tests passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add SqlServerBaselineProvider: time-bucketed baselines from SQL Server collect.* tables with @@DATEFIRST normalization, CTE restart exclusion, bucket collapse hierarchy (full → hour-only → flat), 1-hour TTL cache - Upgrade SqlServerAnomalyDetector: inject baseline provider, upgrade 4 existing detectors to time-bucketed baselines, add 3 new detectors (batch requests, sessions, query duration) - Update FactScorer: score ANOMALY_BATCH_REQUESTS, ANOMALY_SESSION_SPIKE, ANOMALY_QUERY_DURATION (deviation-based) - Port correlated timeline lanes UI: baseline bands, anomaly dots, Compare dropdown with ghost line overlay, remove right-side value labels, rename Memory MB → Buffer Pool MB, fix auto-refresh flicker - Port crosshair manager: ▲/▼ baseline indicators, comparison label, event-based spike detection for blocking/deadlocks - Fix pre-existing CPU tooltip bug: data returned DESC, binary search assumed ASC — added OrderBy - Fix event-based baseline: use wait_stats spine for zero-inclusive baselines, handle zero-mean EffectiveStdDev for event metrics - Cross-server validated on sql2016–sql2025, all queries < 250ms Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 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.
Summary
SqlServerBaselineProvider) with SQL Servercollect.*tables,@@DATEFIRSTnormalization, CTE restart exclusionSqlServerAnomalyDetectorto time-bucketed baselines + 3 new detectors (batch requests, sessions, query duration)Test plan
🤖 Generated with Claude Code