A recorded, step-by-step log of a single AI inference, the prompt, tool calls, intermediate reasoning, tokens, latency, and final output.
An AI trace is the recorded execution of a single model or agent call: the inputs, the output, latency, token counts, and any tool calls made along the way. It is the unit of evidenceEvidenceValidationData supporting or refuting a hypothesisView reference → behind a featureFeatureProduct SpecificationA product capability or featureView reference → that thinks, and without it a misbehaving model is a black box you can only guess at.
Tracing is old; the application to language models is recent. The shape borrows directly from distributed tracing, where a request fans out into nested spans, each timed and attributed. The OpenTelemetry GenAI Special Interest Group, formed in April 2024 under the Cloud Native Computing Foundation, standardised that vocabulary for AI: how to name a span, what attributes a tool call carries, which span kind marks an agent. Before it, tools like LangSmith, Langfuse, and Traceloop each used incompatible proprietary formats, which locked teams into one vendor's view of their own system. The convention is now adopted across Datadog, Google Cloud, AWS, and Azure.
A support agent answers a refund question. The top-level trace captures the user message, the final reply, 4,200 prompt tokens, 380 completion tokens, and 2.1 seconds of latency. Inside it sit three child spans: a retrieval call against the knowledge base, a lookup_order tool call that returns the order status, and the final generation. A week later the same flow starts returning wrong refund amounts. The engineer opens one failing trace, sees the lookup_order span returned a stale total, and fixes the tool rather than the prompt. The trace turned "the AI is wrong sometimes" into a precise, located fault.
In the Unified Product Graph, an AI Trace sits in the AI region as the observability record of model execution. The model that ran it connects through AI ModelproducesAI Tracecausal, and nested child spans connect through ai_model_produces_ai_traceAI TracespawnsAI Tracehierarchy, which lets a parent agent call hold its retrieval and tool sub-calls as queryable children. That self-referencing edge matters because agent behaviour is recursive: debugging means walking from the symptomSymptomEngineeringA symptom of a problemView reference → at the top down to the span that actually failed.ai_trace_spawns_ai_trace
Type-specific fields on BaseNode
inputsstringSerialised input
outputsstringSerialised output
called_atstringISO timestamp called
latency_msnumberRound-trip latency (ms)
input_tokensnumberInput tokens
output_tokensnumberOutput tokens
costnumberMonetary cost
errorstringError message on failure
status_codenumberHTTP or API status
feedback_scorenumberHuman or automated quality score
tagsstring[]Free-form classification tags
idstringrequiredUnique identifier (UUID)
typeNodeTyperequiredDiscriminator for the entity type
titlestringrequiredDisplay name
descriptionstringOptional detailed description
statusstringLifecycle status
tagsstring[]Freeform tags for filtering
3 edge types connected to this entity.
ai_trace_spawns_ai_trace