Add execution stats endpoint for dashboard metrics #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The UI mockups show summary statistics (Avg Duration, Failure Rate, P99 Latency, Active Now) in the Transaction Explorer stats bar and the Dashboard page. These cannot be derived from the search API alone —
SearchResultonly providestotalcount and a page of results.Proposed Change
Add a new endpoint
GET /api/v1/stats/executionsthat returns aggregated metrics for a given time window:Query parameters:
timeFrom,timeTo(defaults to last 24h).ClickHouse is well-suited for this —
quantile(0.95)(duration_ms)andavg(duration_ms)are efficient aggregate functions.Context
Identified during UI planning. The Transaction Explorer stats bar and Dashboard hero stats both need this data. Without it, the UI can only show total match count from search results.