Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

6.9 KB
Raw Blame
{
  "$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"
}