Skip to content
Telemetry
AI-assisted analysis

Describe your question. Get an editable SQL query.

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

  • Get a first query when you're unsure which SQL to write.
  • Read and edit the SQL behind the results.
  • Ask an agent to draft a dashboard. Your team chooses the metric definitions and alert thresholds.

How it works

How to set it up

1

Give the question enough context

Name the table and explain how to calculate the metric. Specify the time range, grouping, and columns you want back.

2

Check the query logic

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

3

Review before saving

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

What this does not replace

  • Generated SQL is a starting point, not an authoritative metric definition or security decision.
  • The agent only has the context you give it in the schema, prompt, and event definitions.
  • Check fields, joins, denominators, null handling, and time windows before using a query in a dashboard or alert.

Try the example

Read the schema, SQL, and sample result

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.

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
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

Related guides and examples

Start with one production workflow

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