Tether
DocsPricingContactGet started

Operations

Telemetry

An assistant that behaves oddly is not debuggable from logs. ai_request_telemetry records the decisions a turn made, so "why did it not use my tool?" has an answer.

Where it lives

One row per request in ai_request_telemetry, written best-effort off the request path. Loss-tolerant by design: analytics must never take a turn down. Indexed on (organization_id, created_at) and on result_path.

Enabled with AI:Telemetry:Enabled, which defaults to on.

The fields

Identity

FieldNotes
request_idCorrelates with ai_usage_record rows for the same turn
session_idThe conversation thread
organization_id, location_idTenant and scope
endpointWhich API surface: chat, chat_stream, insights_ui and the others. starter is a turn the engine ran itself, in the background, to store the answer to one of the start screen's suggested questions
capability_modestandard or deep, after clamping
key_kindThe kind of key the turn was made with: secret, publishable, agent, sandbox and the others on Authentication. null on rows written before 2026-10-22. The operator's onboarding funnel counts a workspace's first publishable turn, a visitor answered on the widget, as first_widget_turn

Routing — why the turn did what it did

FieldNotes
route_kindThe router's decision: Navigation, Troubleshooting, LiveDataAnalysis, MixedGuidance, ActionExecution or GeneralConversation
routeThe path the turn then took: tool_calling, static_context, instant_greeting, handoff and the others; the stream's mostly carry a stream_ prefix. starter_cache and stream_starter_cache are a suggested question answered from its stored answer, with no model call
intentThe intent classifier's opinion: navigation, analysis or action. It never sees your catalog and decides nothing; the router's decision is route_kind
matched_aliaspath_question_override when a where-do-I-find question named a screen and something your tools cover, else null. No alias detector ships, so no other value appears
positive_signals, negative_signalsWhich rules fired, and which downgraded a route
routing_confidenceMargin between the top and runner-up route, 0–1
used_ambiguity_fallbackLow confidence triggered clarification or a tie-breaker
used_prior_session_contextAlways false: nothing sets it
deterministic_bypassAlways false: the guide-catalog bypass that once answered navigation questions without a model call is deleted. Turns that make no model call show model: none and their own result_path
selected_surface, surface_from_headerClient surface, and whether it was explicit

Tools and grounding

FieldNotes
tool_countTools actually called
selected_tool_count, selected_tool_domainsTools offered to the model, and their domains
context_sections, context_cache_hitnull on rows written since October 2026: the context step they described read nothing and is deleted
retrieved_chunk_count, retrieved_chunk_ids0 and null: they counted the deleted guide catalog. Knowledge a turn drew on is named on the response's meta.knowledge
source_types_usedtool when the turn offered at least one of your tools, else null. Rows written before October 2026 may say context for a context step that read nothing, or tool on a tool route that had nothing to offer

Latency, in milliseconds

scope_ms, history_ms, openai_ms, validation_ms, total_ms. context_ms is 0 on rows written since October 2026. Since November 2026 the session's history is read while the rest of the turn is prepared, so history_ms is how long the turn then waited for it, not how long the query took; 0 means it was ready.

FieldNotes
first_token_msFrom the start of the turn to the first text chunk on the stream. On a buffered turn answered from a stored answer, the time it was ready. null on other buffered turns and on rows written before November 2026
first_cards_msFrom the start of the turn to the first cards frame on the stream. Always null on a buffered turn, and on a turn that showed no cards

Outcome

FieldNotes
schema_validWhether the model's output validated first time
result_pathok, fallback, handoff, out_of_scope, budget_exceeded, provider_error, error, canceled. provider_error_fallback appears only on rows written before October 2026, when a failed tool loop on /v1/chat was answered by a second model call
fallback_modeHow it degraded — including the specific budget cap that tripped
stop_reasonWhy the model stopped, when it was not on its own: max_tool_turns (the last call the tool-turn ceiling allowed had to answer), turn_deadline (the same, once the turn deadline had passed), incomplete:<reason> from the provider (incomplete:max_output_tokens is an output ceiling set too low) or failed. Null otherwise
modelThe model the provider reported. none on a turn that never called a model
prompt_tokens, completion_tokens, estimated_cost_usdSummed across the turn's calls, including on an error or canceled row, which carries the calls answered before it ended
cached_input_tokensThe part of prompt_tokens the provider read from its prompt cache, summed across the turn's calls. 0 on rows written before November 2026
answer_cachestarter when the answer was a stored answer to a suggested question: model is none and the cost 0. null otherwise

The four questions it answers

"Why did it not use my tool?"

SELECT route, intent, selected_tool_count, selected_tool_domains, tool_count,
       routing_confidence, negative_signals
FROM ai_request_telemetry
WHERE organization_id = 42 AND created_at >= now() - interval '1 hour'
ORDER BY created_at DESC
LIMIT 20;

selected_tool_count = 0 means nothing was offered: either the router decided the turn did not need tools, or the route takes tools and none were left to offer (no catalog, a preview sandbox, an image turn whose tools refuse images, a deep_analysis_only tool on a plan without deep analysis). Either way, unless it was a navigation question, the model was told no records were looked up. route tells the two apart: tool_calling with selected_tool_count = 0 is the second. selected_tool_count > 0 with tool_count = 0 means the tools were offered and the model chose not to call them, which is a description problem, not a routing one.

"Why is it slow?"

SELECT date_trunc('hour', created_at) AS hour,
       percentile_cont(0.5)  WITHIN GROUP (ORDER BY total_ms)  AS p50,
       percentile_cont(0.95) WITHIN GROUP (ORDER BY total_ms)  AS p95,
       percentile_cont(0.95) WITHIN GROUP (ORDER BY openai_ms) AS p95_model,
       avg(context_ms) AS ctx, avg(history_ms) AS hist
FROM ai_request_telemetry
WHERE created_at >= now() - interval '1 day'
GROUP BY 1 ORDER BY 1;

total_ms far above openai_ms puts the time in context assembly, history, or your tool endpoint.

"Is the output contract holding?"

SELECT date_trunc('day', created_at) AS day,
       count(*) FILTER (WHERE NOT schema_valid)::numeric / count(*) AS invalid_rate,
       count(*) FILTER (WHERE fallback_mode IS NOT NULL) AS fallbacks
FROM ai_request_telemetry
WHERE created_at >= now() - interval '14 days'
GROUP BY 1 ORDER BY 1;

A rising invalid_rate after a model change is the earliest signal you get that answers are degrading, and it arrives before anyone complains.

"What is failing?"

SELECT result_path, fallback_mode, count(*)
FROM ai_request_telemetry
WHERE created_at >= now() - interval '1 day'
GROUP BY 1, 2 ORDER BY 3 DESC;

result_path

ValueMeaning
okNormal, including turns that never called a model
fallbackThe model answered outside the contract and the answer was repaired or replaced. fallback_mode is schema_repair, fallback_text or navigation_guard
out_of_scopePolicy refused before any spend
budget_exceededThe breaker refused. fallback_mode names the cap
handoffThe customer asked for a person; no model was called
provider_errorThe provider call failed and the caller got the provider_error document. fallback_mode is provider_error
provider_error_fallbackOn /v1/chat, the tool loop failed, the static retry failed too, and the caller got the provider_error document
errorThe turn failed. fallback_mode is rate_limited (the provider throttled the turn, on either door), plan_quota_exceeded (a free tenant used its daily request quota, on either door), provider_validation, provider_error or similar
canceledThe client disconnected mid-turn

Worth alerting on

SignalWhy
result_path = 'budget_exceeded' appears at allA customer is being refused right now
invalid_rate up week over weekOutput quality is drifting
selected_tool_count = 0 on a rising share of turnsThe router is declining to offer tools, or a catalog went missing
p95(total_ms) up while p95(openai_ms) is flatSomething other than the model got slower
result_path = 'error' with fallback_mode = 'rate_limited'You are being throttled upstream
stop_reason = 'max_tool_turns' on a rising share of turnsQuestions need more tool rounds than the plan allows, or the model is looping
stop_reason LIKE 'incomplete:max_output_tokens'The output ceiling is cutting answers off, often in reasoning

What it does not contain

No prompts, and no answers. Telemetry records decisions and measurements, not content. Conversations live in ai_chat_message; tool results are never persisted at all.

No tool-level detail. There is no per-tool latency or failure breakdown — tool_count and selected_tool_domains are the granularity. Your own endpoint's logs are the place to see which tool was slow.