Telemetry
AI operations

llm_request_completed event schema

A terminal model-call event with model, tokens, latency, allocation cost, and tool outcome—without prompts or generated content.

Reviewed by the Telemetry product team on . Event grain, ownership, field types, privacy classification, example payload, and validation. Review standards and ownership

Question this contract answers

What does each successful AI workflow cost and how well does it perform?

Fields
10
Required
9
Contract evidence path

llm_request_completed: from owned boundary to trusted query

Treat llm_request_completed as a durable analytical contract: the owner emits one documented grain, a fixture proves the fields, and a reviewed query answers the stated question.

  1. 1

    Outcome becomes final

    Shared model gateway or provider adapter emits only after token usage, outcome, and provider response are final.

  2. 2

    Contract is bounded

    9 required fields preserve the declared grain: One completed model-provider request.

  3. 3

    Fixture is verified

    Check types, UTC time, alternate outcomes, idempotency, and every pseudonymous or review-classified field.

  4. 4

    Question is answered

    What does each successful AI workflow cost and how well does it perform?

Grain

One completed model-provider request.

Owner

Shared model gateway or provider adapter

Emit when

After token usage, outcome, and provider response are final.

Field contract

Typed fields with explicit privacy boundaries

Keep existing field names and types stable after production queries depend on them. Optional context should remain bounded, documented, and justified by a specific decision.

FieldTypeRequiredPrivacyMeaning
timestamp_utctimestampyesnon-sensitiveUTC time at the outcome boundary.
event_idstringyesnon-sensitiveStable unique identifier used for deduplication.
releasestringyesnon-sensitiveApplication or service version that emitted the event.
account_idstringyespseudonymousStable internal account identifier, never an email or name.
workflowstringyesnon-sensitiveStable product workflow using the model.
modelstringyesnon-sensitiveProvider model identifier.
input_tokensnumberyesnon-sensitiveProvider-reported input tokens.
output_tokensnumberyesnon-sensitiveProvider-reported output tokens.
cost_usdnumbernonon-sensitiveEstimated allocation cost, reconciled separately.
statusstringyesnon-sensitiveFinal provider or workflow outcome.

Synthetic JSON event

{
  "timestamp_utc": "2026-07-28T14:18:44Z",
  "event_id": "evt_llm_01",
  "account_id": "acct_8f31",
  "release": "2026.07.2",
  "workflow": "query_explanation",
  "model": "model_family_a",
  "input_tokens": 820,
  "output_tokens": 244,
  "cost_usd": 0.0124,
  "status": "success"
}

Privacy review

Review identifiers before ingestion

This example uses synthetic identifiers. Pseudonymous values can still be personal data, and review fields can expose business or provider context. Apply your own consent, retention, access, residency, and deletion requirements.

  • account_id: pseudonymous

Validation checklist

Prove the contract before building a dashboard

  • Send one known llm_request_completed fixture after the documented outcome boundary.
  • Verify all 9 required fields arrive with the documented types.
  • Retry the same event identifier and confirm the chosen deduplication behavior.
  • Send a controlled failure or alternate outcome when the workflow supports one.
  • Run the related SQL over a fixed window and reconcile the result to the fixture.

Common mistakes

Keep one row equal to one durable outcome

  • Emitting llm_request_completed before shared model gateway or provider adapter knows the final outcome.
  • Mixing several grains in one table, which makes counts and rates ambiguous.
  • Replacing controlled categories with raw URLs, payloads, prompts, or error text.
  • Changing a field type in place after saved queries and dashboards depend on it.
  • Adding identifiers without a documented investigation, access, and retention need.

Use the contract

Query and operationalize the event

Related contracts

Send a fixture before production traffic

Create a free API key, send the synthetic event, and inspect the inferred table before connecting a live workflow.

Test this schema