1
0
forked from wrenn/wrenn

Add 5m, 1h, 6h, 12h range filters to metrics endpoint

Maps each user-facing range to the appropriate underlying ring buffer
tier and applies a time cutoff filter. No new ring buffers needed —
5m/10m read from the 10m tier, 1h/2h from the 2h tier, 6h/12h/24h
from the 24h tier.
This commit is contained in:
2026-03-25 20:44:28 +06:00
parent 9acdbb5ae9
commit 49b0b646a8
3 changed files with 65 additions and 17 deletions

View File

@ -782,9 +782,9 @@ paths:
required: false
schema:
type: string
enum: ["10m", "2h", "24h"]
enum: ["5m", "10m", "1h", "2h", "6h", "12h", "24h"]
default: "10m"
description: Time range tier to query
description: Time range filter to query
responses:
"200":
description: Metrics retrieved
@ -2042,7 +2042,7 @@ components:
type: string
range:
type: string
enum: ["10m", "2h", "24h"]
enum: ["5m", "10m", "1h", "2h", "6h", "12h", "24h"]
points:
type: array
items: