Added
queryonclient.analytics(sync and async) — run a composable analytics query: a metric over a filtered stream, optionally broken down by a dimension and/or bucketed over time, returning a tidy series (key/bucket_start/valueitems) for charts and dashboards. The request is discriminated onstream:tracesaccepts a semanticqueryand abreakdown(model,provider,service,tool,tag,name,userId,status);sessionsaccepts a semanticqueryand the same breakdowns minusname;spansaccepts abreakdown(the scalar dims plus the span-onlyoperation). Metrics arecount,errorRate,cacheHitRate, or{sum|min|max|avg|median}overduration/cost/tokens. Adds theAnalyticsQueryrequest andAnalyticsSeriesresponse types. Resultvalues are in display units — seconds forduration, dollars forcost, a 0–1 ratio forerrorRate/cacheHitRate, otherwise a raw count/token total.