1. Event schema
One row in agent_events, with the types used by the query made explicit.
- timestamp_utc
- Timestamp
- event_name
- Utf8
- data.tool_name
- Utf8
- data.status
- Utf8
- data.args.operation
- Utf8
- data.latency_ms
- Float64
Describe what you want to know. Telemetry uses your table metadata to draft a DataFusion query or suggest a chart. Check the SQL and results before saving it.
Outcomes
How it works
Name the table and explain how to calculate the metric. Specify the time range, grouping, and columns you want back.
Check field types, joins, denominators, null handling, and time boundaries before trusting the chart.
Save the query after you have checked its results. Add a clear name so a teammate can find and reuse it.
Generating an editable query with AI
Ask a question and review the generated SQL in the editor.
Boundaries
Try the example
This example includes the schema, read-only SQL, and synthetic results. Use it to check how the query works. It does not measure customer results.
One row in agent_events, with the types used by the query made explicit.
Which AI tools and arguments are associated with the most failed calls?
SELECT
"data.tool_name" AS tool_name,
"data.args.operation" AS operation,
COUNT(*) AS calls,
SUM(CASE
WHEN "data.status" = 'failed' THEN 1 ELSE 0
END) AS failures,
100.0 * SUM(CASE
WHEN "data.status" = 'failed' THEN 1 ELSE 0
END) / NULLIF(COUNT(*), 0) AS failure_rate_pct,
approx_percentile_cont("data.latency_ms", 0.95) AS p95_latency_ms
FROM agent_events
WHERE event_name = 'agent_tool_called'
AND timestamp_utc >= now() - INTERVAL '7 days'
GROUP BY "data.tool_name", "data.args.operation"
HAVING COUNT(*) >= 20
ORDER BY failure_rate_pct DESC, calls DESC;CRM lookup is both the least reliable tool operation and the slowest at p95.
| tool_name | operation | calls |
|---|---|---|
| crm_lookup | search_contact | 842 |
| order_api | fetch_order | 2210 |
| knowledge_search | semantic_search | 4510 |
Capabilities
Documentation
See the analysis
Filter dotted nested fields and rank failing tools without flattening the original event payload.
Open recipeConnect model spend to accepted, saved, or otherwise useful product outcomes.
Open recipeGroup users by first activity week and measure the percentage returning in later weeks.
Open recipeCustomer evidence
Related capabilities
Use a focused prompt, send synthetic events, and verify the first useful query before expanding coverage.