litellm/scripts/trace_codegen/schemas/traces/TracePage.json
ishaan-berri b85756104f
feat(lens): show agent, user and slack thread first in the run header (#45261)
* feat(lens): add who started the run to RunSource

* feat(lens): carry agent.source.user on trace span rows

* feat(lens): resolve the run source user from the span row

* feat(lens): read agent.source.user in trace_spans query

* feat(lens): read agent.source.user in trace_page_spans query

* feat(lens): read agent.source.user in trace_span_batch query

* feat(lens): read agent.source.user in trace_list_span_batch query

* feat(lens): decode the source user from clickhouse span rows

* test(lens): add source user to trace cache test rows

* test(lens): add source user to trace cache read fixtures

* test(lens): add source user to trace cache snapshot fixtures

* test(lens): add source user to capture fixture rows

* test(lens): round-trip source user on span row contract

* test(lens): cover run source user resolution

* chore(lens): regenerate python trace types with source user

* chore(lens): regenerate trace json schema with source user

* chore(lens): regenerate trace page json schema with source user

* chore(ui): add source user to api types

* feat(lens): add run user chip and slack thread chip

* feat(lens): put agent, user and thread on the first row of the run header

* test(lens): cover the run header identity row and compact totals

* feat(lens): start demo runs from a slack thread
2026-10-07 20:01:55 -07:00

221 lines
4.8 KiB
JSON

{
"$defs": {
"RunSource": {
"description": "The conversation that started the run, from the `agent.source.*` span attributes.",
"properties": {
"title": {
"type": "string"
},
"type": {
"$ref": "#/$defs/RunSourceType"
},
"url": {
"type": "string"
},
"user": {
"description": "Who started the conversation, e.g. the Slack user's email.",
"type": "string",
"x-python-optional": true
}
},
"required": [
"type",
"url",
"title"
],
"type": "object"
},
"RunSourceType": {
"enum": [
"slack",
"teams",
"discord",
"linear",
"github",
"jira",
"custom"
],
"type": "string"
},
"SpanStatus": {
"enum": [
"ok",
"error",
"unset"
],
"type": "string"
},
"TraceSummary": {
"properties": {
"agent_count": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"agent_invocations": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"agent_names": {
"items": {
"type": "string"
},
"type": "array",
"x-python-optional": true
},
"duration_ms": {
"format": "double",
"type": "number"
},
"error_count": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"frameworks": {
"items": {
"type": "string"
},
"type": "array",
"x-python-optional": true
},
"input_preview": {
"type": "string"
},
"input_tokens": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"llm_calls": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"models": {
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"type": "string"
},
"output_tokens": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"priced_calls": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"resolution_limited": {
"type": "boolean",
"x-python-optional": true
},
"service": {
"type": "string"
},
"source": {
"anyOf": [
{
"$ref": "#/$defs/RunSource"
},
{
"type": "null"
}
],
"x-python-optional": true
},
"span_count": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"spend": {
"format": "double",
"type": [
"number",
"null"
]
},
"start_time": {
"type": "string"
},
"status": {
"$ref": "#/$defs/SpanStatus"
},
"tool_calls": {
"format": "uint64",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"trace_id": {
"type": "string"
},
"trace_ref": {
"type": "string",
"x-python-optional": true
}
},
"required": [
"resolution_limited",
"trace_id",
"trace_ref",
"name",
"service",
"agent_names",
"frameworks",
"input_preview",
"start_time",
"duration_ms",
"status",
"span_count",
"agent_count",
"agent_invocations",
"llm_calls",
"tool_calls",
"error_count",
"input_tokens",
"output_tokens",
"models",
"spend",
"priced_calls"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"data": {
"items": {
"$ref": "#/$defs/TraceSummary"
},
"type": "array"
},
"next_cursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"data",
"next_cursor"
],
"title": "TracePage",
"type": "object"
}