Skip to content
Telemetry
Structured event ingestion

Send JSON events. Query them with SQL.

Send JSON events from product flows, APIs, jobs, webhooks, and agents. Telemetry creates the table schema and updates it as you add fields, so you can query the events with SQL.

Outcomes

  • Use consistent event names and fields across services so people and coding agents can query them.
  • Record status, latency, identifiers, costs, and error categories in the same event.
  • Add fields without rebuilding your data pipeline.

How it works

How to set it up

1

Choose one completed workflow

Log an event when a user action, job, API call, webhook, or agent run finishes. Record what happened and the fields you need to investigate it.

2

Choose the fields you need to query

Include stable identifiers, status, duration, environment, feature, and categorized error context. Keep secrets and raw private content out.

3

Check the first events

Send test events, inspect the inferred schema, and run a query. Check that the fields answer your question before adding more events.

Structured event tables in Telemetry

Structured event tables in Telemetry

Event tables and the SQL editor in a Telemetry workspace.

Boundaries

What this does not replace

  • Your team decides which personal or regulated data it can collect. Assign an owner and retention policy to each event contract.
  • Telemetry updates the schema as fields change. You still need clear event names, consistent units, and identifiers that mean the same thing across services.
  • Use structured events alongside traces and database diagnostics. You will still need those tools for low-level debugging.

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

HTTP ingestion API plus JavaScript, Python, Go, and Rust SDKs
Nested JSON fields exposed as queryable dotted columns
Schema compatibility checks before events enter the live buffer
Automatic UTC timestamp field for time-series analysis
Read, write, and read-and-write API-key scopes

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.