Repository navigation
Conversation
… lists quantile_over_time takes a required list of levels in [0, 1], checked at parse time; other functions reject a list. One quantiles() per bucket and group fans out to a series per level, labelled by... then p, on the range and instant endpoints. Each exemplar goes to the series of its group whose quantile has the nearest query-wide value. That value comes from a GROUPING SETS row on the series statement, since a WITH TOTALS block doesn't reach a client over HTTP. BREAKING: quantile_over_time(duration) is a parse error, and every series carries p, including with by() and on the instant endpoint.
This was referenced Nov 9, 2026
This branch has not been deployed
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.
Stacked on #1087; merge that first.
quantile_over_timetakes a list of quantiles, as in Tempo.Summary
quantile_over_time(field, q1, q2, …)takes one or more numbers, each checked against [0, 1] at parse time (quantile must be between 0 and 1: <q>).quantiles(q1, …)(col)per bucket and group, the same ClickHouse family as before. Values are not Tempo's approximate log2 buckets.by…thenp=<q>as a float, always, including withby(), on both the range and instant endpoints.GROUP BY GROUPING SETS ((ts, by…), ())on the same statement, which survives HTTP, unlikeWITH TOTALS.Breaking changes
Queries that now fail
quantile_over_timerequires at least one quantile, andquantile_over_time(duration)is a parse error instead of defaulting to 0.5. Values outside [0, 1] fail at parse time, and a quantile list on any other metrics function is a parse error.Results that change
quantile_over_timeseries carriesp, including withby()and on the instant endpoint.Upgrade notes
quantile_over_time(duration)need an explicit quantile, for examplequantile_over_time(duration, 0.5).Evidence
go test ./...passes. The full e2e suite andgrid.traceqlpass on the full stack tip, which includes this branch.Merge Danger
Door: two-way.
Blast Radius:
quantile_over_timeonly.quantilessamples above its reservoir size, like thequantile()it replaces, and exemplar assignment shares that limit.by (p)is accepted and gives twoplabels.reader/service/tempo_quoted_names_test.gocallsmetricsRequestandcompareRequestwithout the other PR's argument. Quantiles are not scaled under sampling.Pre-existing, unchanged: an instant query with no
by()that matches no span returnsNaN, which fails JSON encoding.