feat: add treemap and punchcard heatmap to dashboard L1/L2 (#94)

Treemap: rectangle area = transaction volume, color = SLA compliance
(green→red). Shows apps at L1, routes at L2. Click navigates deeper.

Punchcard heatmap: 7-day rolling weekday x 24-hour grid showing
transaction volume and error patterns. Two side-by-side views
(transactions + errors) reveal temporal clustering.

Backend: new GET /search/stats/punchcard endpoint aggregating
stats_1m_all/app by DOW x hour over rolling 7 days.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-30 10:26:26 +02:00
parent b5c19b6774
commit 9d2d87e7e1
9 changed files with 433 additions and 17 deletions

View File

@@ -83,4 +83,8 @@ public class SearchService {
public int activeErrorTypes(Instant from, Instant to, String applicationName) {
return statsStore.activeErrorTypes(from, to, applicationName);
}
public List<StatsStore.PunchcardCell> punchcard(Instant from, Instant to, String applicationName) {
return statsStore.punchcard(from, to, applicationName);
}
}

View File

@@ -60,4 +60,9 @@ public interface StatsStore {
// Count of distinct error types in window
int activeErrorTypes(Instant from, Instant to, String applicationName);
// Punchcard: aggregate by weekday (0=Sun..6=Sat) x hour (0-23) over last 7 days
List<PunchcardCell> punchcard(Instant from, Instant to, String applicationName);
record PunchcardCell(int weekday, int hour, long totalCount, long failedCount) {}
}