litellm/scripts/trace_codegen/schemas/traces-clickhouse/TraceQueryHelp.json
devin-ai-integration[bot] e340e546e2
feat(traces): tracing development seed (#44363)
* feat(dev): seed linked tracing and spend fixtures

* chore(dev): use OpenAI model in tracing config

* chore(dev): align tracing credentials with UI E2E

* fix(dev): update fixture seeder query scope

* feat(dev): seed linked tracing and spend fixtures

* chore(dev): use OpenAI model in tracing config

* chore(dev): align tracing credentials with UI E2E

* fix(dev): update fixture seeder query scope

* wip

* wip

* wip

* chore(trace): checkpoint ongoing Rust migration

* refactor(trace): group Python bridge under trace package

* refactor(traces): read span conventions through a Convention trait

Each span format (Claude Code, LangSmith, OpenInference, gen_ai) now lives under
normalize/convention/ as a unit struct implementing Convention, owning both its
detection and its extraction. Precedence is one ordered registry instead of an
if-chain in mod.rs that reached into each module differently.

The modules now share one way to read attributes: present() for the first
non-empty key and Payload for a text that also reports the key it consumed,
replacing three different idioms and the &mut Vec threaded through payload
readers. Instrumentation::adjust returns a new Extraction instead of mutating
one, with each SDK rule as its own function, and the LangChain middleware
suffix list exists once.

* feat(trace): export Rust-owned wire schemas and enforce contract bounds

* fix(trace): bound quoted counts in ClickHouse wire schemas

* feat(trace): generate Python wire contracts with datamodel-code-generator

* test(trace): validate migrated callers and generated contracts at the native boundary

* refactor(traces): rename normalization convention to format

* fix(traces): reconcile spend evidence and preserve unknown costs

* feat(traces): normalize additional telemetry formats

* test(traces): cover captured normalization fixtures

* refactor(traces): isolate SDK normalization rules

* feat(tracing): seed all trace exports for local dashboard

* fix(clickhouse): preserve custom LiteLLM request metadata

* docs(traces): define normalization module boundaries

* docs(traces): define resolution and OTLP boundaries

* fix(ui): normalize nullable trace message names

* refactor(traces): split resolver modules and cover resolution behavior

* test(traces): replace normalization snapshots with behavior assertions

* fix(ui): align dashboard API contracts with generated types

* refactor(traces): type normalization and storage boundaries

* fix(traces): seed captured SDK spend and preserve provider identities

* wip

* test(traces): verify guide discovery and content ordering

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-03 09:59:51 +00:00

360 lines
6.9 KiB
JSON

{
"$defs": {
"MapValueType": {
"enum": [
"String"
],
"type": "string"
},
"MetadataValueType": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
],
"type": "string"
},
"PathPart": {
"anyOf": [
{
"type": "string"
},
{
"format": "uint",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
}
]
},
"TraceQueryAttributeField": {
"additionalProperties": false,
"properties": {
"expression": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"$ref": "#/$defs/MapValueType"
}
},
"required": [
"key",
"type",
"expression"
],
"type": "object"
},
"TraceQueryAttributes": {
"additionalProperties": false,
"properties": {
"column": {
"type": "string"
},
"discovery_sql": {
"type": "string"
},
"error": {
"default": null,
"type": [
"string",
"null"
]
},
"fields": {
"items": {
"$ref": "#/$defs/TraceQueryAttributeField"
},
"type": "array"
},
"scope": {
"type": "string"
},
"table": {
"$ref": "#/$defs/TraceTableName"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"table",
"column",
"fields",
"truncated",
"discovery_sql",
"scope"
],
"type": "object"
},
"TraceQueryColumn": {
"additionalProperties": true,
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"TraceQueryExample": {
"properties": {
"name": {
"type": "string"
},
"sql": {
"type": "string"
}
},
"required": [
"name",
"sql"
],
"type": "object"
},
"TraceQueryMetadata": {
"additionalProperties": false,
"properties": {
"column": {
"type": "string"
},
"error": {
"default": null,
"type": [
"string",
"null"
]
},
"fields": {
"items": {
"$ref": "#/$defs/TraceQueryMetadataField"
},
"type": "array"
},
"invalid_json_rows": {
"format": "uint",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"sample_sql": {
"type": "string"
},
"sampled_rows": {
"format": "uint",
"maximum": 18446744073709551615,
"minimum": 0,
"type": "integer"
},
"scope": {
"type": "string"
},
"table": {
"$ref": "#/$defs/TraceTableName"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"table",
"column",
"fields",
"sampled_rows",
"invalid_json_rows",
"truncated",
"sample_sql",
"scope"
],
"type": "object"
},
"TraceQueryMetadataField": {
"additionalProperties": false,
"properties": {
"expression": {
"type": "string"
},
"path": {
"items": {
"$ref": "#/$defs/PathPart"
},
"type": "array"
},
"types": {
"items": {
"$ref": "#/$defs/MetadataValueType"
},
"type": "array",
"uniqueItems": true
}
},
"required": [
"path",
"types",
"expression"
],
"type": "object"
},
"TraceQueryNormalizedField": {
"additionalProperties": false,
"properties": {
"column": {
"type": "string"
},
"meaning": {
"type": "string"
},
"name": {
"type": "string"
},
"table": {
"$ref": "#/$defs/TraceTableName"
},
"type": {
"type": "string"
}
},
"required": [
"table",
"name",
"column",
"type",
"meaning"
],
"type": "object"
},
"TraceQueryRelationship": {
"additionalProperties": false,
"properties": {
"additional_predicates": {
"type": "string"
},
"left": {
"type": "string"
},
"meaning": {
"type": "string"
},
"right": {
"type": "string"
}
},
"required": [
"left",
"right",
"additional_predicates",
"meaning"
],
"type": "object"
},
"TraceQueryTable": {
"additionalProperties": false,
"properties": {
"columns": {
"items": {
"$ref": "#/$defs/TraceQueryColumn"
},
"type": "array"
},
"name": {
"$ref": "#/$defs/TraceTableName"
}
},
"required": [
"name",
"columns"
],
"type": "object"
},
"TraceTableName": {
"enum": [
"otel_traces",
"agent_traces_by_key",
"spend_logs"
],
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"access": {
"type": "string"
},
"attributes": {
"items": {
"$ref": "#/$defs/TraceQueryAttributes"
},
"type": "array"
},
"dialect": {
"type": "string"
},
"examples": {
"items": {
"$ref": "#/$defs/TraceQueryExample"
},
"type": "array"
},
"gotchas": {
"items": {
"type": "string"
},
"type": "array"
},
"guide": {
"type": "string"
},
"metadata": {
"$ref": "#/$defs/TraceQueryMetadata"
},
"normalized_fields": {
"items": {
"$ref": "#/$defs/TraceQueryNormalizedField"
},
"type": "array"
},
"relationships": {
"items": {
"$ref": "#/$defs/TraceQueryRelationship"
},
"type": "array"
},
"response": {
"type": "string"
},
"tables": {
"items": {
"$ref": "#/$defs/TraceQueryTable"
},
"type": "array"
}
},
"required": [
"dialect",
"access",
"response",
"tables",
"normalized_fields",
"metadata",
"attributes",
"relationships",
"examples",
"gotchas",
"guide"
],
"title": "TraceQueryHelp",
"type": "object"
}