POST /v1/scores/aggregate sums the scores with one name, per group. Right: read.
Body
A score filter.
name is required. from and to are on the score’s own time at.A trace filter. Only the scores of the traces that meet it count (scores on such a trace and on its spans). A score with no trace in the store does not count then.
A second key (a trace field or a root attribute), for a series per value.
groupBy must be a time bucket: else an error. key is the bucket, key2 the value.Percentiles of the value, for example
[50, 95]. Each from 0 to 100, at most 4 decimals. Exact, by the nearest-rank rule.{"by": "count" | "avg", "order": "desc" | "asc"}. order defaults to "desc". Ties by key; rows with no average last. Left out: rows by key.thenBy, sort and limit choose whole series, as in /v1/aggregate.
Answer
How the trace side works
- The server joins the trace when the query runs. It copies nothing onto a score when the score is written. So a group comes from the trace as it is now.
- A trace with two models is in both groups.
- A score with no trace in the store (on a session, or before its trace came) has the key
null, and does not count withtraces. - The query reads the columns of the matching scores, one trace summary per trace of those scores, and for
rootAttributeone span per trace. - To compare two groups (two experiments), run the same query twice: with
"traces": {"root": {"attributes": {"experiment": "A"}}}, then with"B".
Scores
Write and read scores.
Sessions and scores
A guide with real sums of scores.