mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-23 22:07:29 +00:00
Trace storage now answers five storage-neutral reads: runs, run_counts, spans, span_text and calls. Query and row types live in litellm_traces::store with no ClickHouse encodings, and traces-clickhouse only adapts them, so another backend implements five queries instead of one SQL file per UI widget The runs list, histogram, field values, trace graph, span detail, error paging and cost lookup all go through the port. Paging, the graph budget, excerpting and the agent output fallback moved out of SQL into TraceReader. QueryScope is the only access wire, and every SQL file reads owned_spans, owned_runs and owned_calls CTEs built from one ownership rule per table that the console row policy also renders Cursors are tagged with their kind, and run search terms reach storage as raw text and globs. This also carries the run histogram and values endpoints, the gateway-traces router and the agent label rollup
80 lines
1.8 KiB
JSON
80 lines
1.8 KiB
JSON
{
|
|
"$defs": {
|
|
"AgentRuns": {
|
|
"properties": {
|
|
"agent": {
|
|
"type": "string"
|
|
},
|
|
"runs": {
|
|
"format": "uint64",
|
|
"maximum": 18446744073709551615,
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"agent",
|
|
"runs"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"HistogramBucket": {
|
|
"properties": {
|
|
"agents": {
|
|
"description": "Runs that did not fail, by their alphabetically first agent label, or service when unlabelled.",
|
|
"items": {
|
|
"$ref": "#/$defs/AgentRuns"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"end_ms": {
|
|
"format": "int64",
|
|
"maximum": 9223372036854775807,
|
|
"minimum": -9223372036854775808,
|
|
"type": "integer"
|
|
},
|
|
"failed": {
|
|
"format": "uint64",
|
|
"maximum": 18446744073709551615,
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"start_ms": {
|
|
"format": "int64",
|
|
"maximum": 9223372036854775807,
|
|
"minimum": -9223372036854775808,
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"format": "uint64",
|
|
"maximum": 18446744073709551615,
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"start_ms",
|
|
"end_ms",
|
|
"total",
|
|
"failed",
|
|
"agents"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"description": "Matching runs per equal-width slice of the window.",
|
|
"properties": {
|
|
"buckets": {
|
|
"items": {
|
|
"$ref": "#/$defs/HistogramBucket"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"buckets"
|
|
],
|
|
"title": "TraceHistogram",
|
|
"type": "object"
|
|
}
|