Discovery
Python JQL discovery kinds, options, and returned catalog rows.
client.discover(kind, *, limit=None, **options)Discovery returns the normal JqlQueryResponse envelope. Its rows vary by kind.
| Kind | Valid options | Returned row columns |
|---|---|---|
judges | history?, limit? | Current: id, name, judge_type, score_type, online_evaluation_mode, judge_description; history: judge_name |
behaviors | history?, limit? | Current: judge_id, judge_name, value, description; history: judge_name, values |
span_names | time?, limit? | span_name |
models | time?, limit? | model |
fields | source required, limit? | Field capability descriptor; see below |
citations | judge required, value?, time?, limit? | trace_id, session_id, cited_spans, reason |
rules | limit? | rule_id, name, description, conditions, active, actions |
judge_prompts | limit? | name, judge_id, judge_major_version, prompt |
judge_config | limit? | name, judge_description, judge_type, score_type, online_evaluation_mode |
source is valid only for fields and must be traces or spans.
time is meaningful for span_names, models, and citations; discovery
accepts last and since but not between, and passing time to a
config-store kind fails with BAD_QUERY.
judge is required for citations.
client.discover sends its limit as the request cap only. The IR-level
limit shown below is set by building the discovery object directly.
Field descriptor
{
"field": "cost",
"label": "Cost",
"source": "spans",
"origin": "canonical",
"data_type": "number",
"unit": "usd",
"filter_operators": ["eq", "ne", "gt", "gte", "lt", "lte"],
"aggregate_functions": [
"sum",
"avg",
"min",
"max",
"quantile",
"count_distinct"
],
"groupable": false,
"sortable": true,
"default_format": "currency_usd"
}Use descriptors rather than assuming that a field can be filtered, grouped, sorted,
or aggregated. Trace discovery also exposes derived span_count, which is a
projection-only field and is not filterable, groupable, sortable, or aggregatable.
Canonical discovery IR
{
"op": "discovery",
"kind": "span_names",
"time": { "last": "7d" },
"limit": 100
}