mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
vmselect ORs repeated extra_filters, so a client-supplied value would widen the tenant scope. The upstream request is therefore built from scratch: only query, start, end, step, time, match[] and a clamped timeout are read from the client, and the namespace selector is sent as the single extra_filters[] value. The query itself is not parsed; vmselect ANDs that filter into every selector. The label endpoints always carry a match[] (the namespace selector when the client sent none), because a vmselect started with -search.ignoreExtraFiltersAtLabelsAPI applies extra filters there only when a match[] is present. Range, points per series and step are bounded with 422 per the cost limits of the metrics proposal. Times are accepted only in the two forms the Prometheus API defines, since vmselect guesses the unit of a numeric timestamp from its digit count. The window start picks the short-term store when it lies within that store's retention. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>