Telemetry
AI-assisted analysis

Turn a plain-language question into SQL you can inspect and improve

Use table metadata and a focused prompt to get a first DataFusion query or visualization plan, then review the generated logic against the schema and real result.

Outcomes

  • Reduce the blank-page cost of writing unfamiliar SQL.
  • Keep generated queries visible instead of hiding analysis behind a proprietary report.
  • Let agents create a first dashboard while humans retain control of definitions and thresholds.

How it works

A reviewable workflow from signal to decision

1

Give the question enough context

Name the table, metric definition, time range, grouping, and expected output. Ambiguous business language produces ambiguous SQL.

2

Review the generated assumptions

Check field types, joins, denominators, null handling, and time boundaries before trusting the chart.

3

Save only the queries that survive review

Use AI for acceleration, not authority. A saved query should be understandable by the next human or agent that maintains it.

Generating an editable query with AI

A real product capture showing a plain-language question becoming SQL that remains visible for review.

Boundaries

What this does not replace

  • Generated SQL is a starting point, not an authoritative metric definition or security decision.
  • AI assistance cannot see business context that is absent from the schema, prompt, or reviewed event contract.
  • Queries should be checked for fields, joins, denominators, null handling, and time windows before they power a dashboard or alert.

Inspectable proof path

From event contract to a visible answer

This example uses a declared schema, read-only SQL, and deterministic synthetic results. It demonstrates the workflow without presenting sample data as a customer benchmark.

1. Event contract

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
Browse event contracts

2. Read-only SQL

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;

3. Synthetic result

CRM lookup is both the least reliable tool operation and the slowest at p95.

tool_nameoperationcalls
crm_lookupsearch_contact842
order_apifetch_order2210
knowledge_searchsemantic_search4510
Inspect query, result, and caveats

Capabilities

What is included

Schema-aware SQL generation
Prompt-to-visualization assistance
Generated SQL remains editable in the Query workspace
Works with the same tables, dashboards, and alerts as human-written analysis
Agent skill and prompt pack for repository-level instrumentation

See the analysis

SQL recipes that use this capability

Customer evidence

How teams use this workflow

Related capabilities

Continue the event-to-decision workflow

Start with one production workflow

Use a focused prompt, send synthetic events, and verify the first useful query before expanding coverage.