organizationIdstring required
Organization that owns this span.
projectIdstring required
Project this span belongs to.
traceIdstring required
Identifier of the trace this span belongs to.
spanIdstring required
Stable span identifier within the trace.
parentSpanIdstring nullable required
Identifier of the parent span. null for root spans.
sessionIdstring nullable required
Conversation/session identifier set by the SDK. null when absent.
userIdstring nullable required
End-user identifier set by the SDK. null when absent.
simulationIdstring nullable required
CUID of the simulation that produced this span. null when not a simulation.
apiKeyIdstring nullable required
Latitude API key used to ingest the span. null when ingested without an API key.
startTimestring required
ISO-8601 timestamp at which the span started.
endTimestring required
ISO-8601 timestamp at which the span ended.
namestring required
Span name (e.g. the entry-point function or route).
serviceNamestring required
OpenTelemetry service.name of the emitting service.
kind'unspecified' | 'internal' | 'server' | 'client' | 'producer' | 'consumer' required
statusCode'unset' | 'ok' | 'error' required
OpenTelemetry span status code.
statusMessagestring required
OpenTelemetry status message. Empty when not set.
traceFlagsnumber required
OpenTelemetry trace flags bitfield.
traceStatestring required
OpenTelemetry trace state (vendor-specific propagation). Empty when not set.
errorTypestring nullable required
Error class/type label when the span errored. null for successful spans.
tagsstring[] required
Free-form tags attached at ingest time.
operationstring required
GenAI operation category (e.g. "chat", "embeddings", "execute_tool", "invoke_agent") or a custom string for non-GenAI spans.
providerstring nullable required
LLM provider id. null for non-LLM spans.
modelstring nullable required
Model id as requested. null for non-LLM spans.
responseModelstring nullable required
Model id reported by the provider's response. null for non-LLM spans.
tokensInputnumber required
Input tokens consumed by this span.
tokensOutputnumber required
Output tokens produced by this span.
tokensCacheReadnumber required
Tokens served from the provider's prompt cache.
tokensCacheCreatenumber required
Tokens written to the provider's prompt cache.
tokensReasoningnumber required
Reasoning tokens reported by the model.
costInputMicrocentsnumber required
Cost of input tokens in microcents (100,000,000 per USD).
costOutputMicrocentsnumber required
Cost of output tokens in microcents (100,000,000 per USD).
costTotalMicrocentsnumber required
Total cost in microcents (100,000,000 per USD).
costIsEstimatedboolean required
true when the cost was derived from public pricing tables instead of the provider's bill.
costSource'provider_reported' | 'user_reported' | 'estimated' | 'unpriced' | 'no_tokens' | 'unknown' required
Where the cost came from. provider_reported: the instrumentation sent it. user_reported: you sent it with latitude.cost.source set to user. estimated: priced from public model pricing. unpriced: tokens were reported but no pricing matched, so the cost is 0 but not free. no_tokens: nothing to price. unknown: ingested before cost sources were tracked, so a 0 cannot be read as free.
timeToFirstTokenNsnumber required
Nanoseconds from the start of the span to its first emitted token. 0 if not measured.
isStreamingboolean required
true when the span was produced by a streaming LLM call.
responseIdstring nullable required
Response identifier returned by the LLM. null when the provider didn't return one.
finishReasonsstring[] required
Per-choice finish reasons reported by the LLM provider.
scopeNamestring required
OpenTelemetry instrumentation scope name. Empty when not set.
scopeVersionstring required
OpenTelemetry instrumentation scope version. Empty when not set.
retentionDaysinteger
Per-span retention override in days. Omitted when the project default applies.
ingestedAtstring required
ISO-8601 timestamp at which Latitude received this span.
metadataobject required
Free-form metadata attached at ingest time.
systemInstructionsobject[] required
System instructions in OpenTelemetry GenAI format — an array of part objects.
inputMessagesGenAISpanMessage[] required
Input messages sent into this LLM span, in OpenTelemetry GenAI format.
outputMessagesGenAISpanMessage[] required
Output messages returned by this LLM span, in OpenTelemetry GenAI format.
toolCallIdstring required
Tool-call id this span answers. Empty when the span isn't an execute_tool span.
toolNamestring required
Name of the executed tool. Empty when the span isn't an execute_tool span.
toolInputstring required
Stringified arguments passed to the tool. Empty when the span isn't an execute_tool span.
toolOutputstring required
Stringified tool output. Empty when the span isn't an execute_tool span.
attrStringobject required
OpenTelemetry attributes with string values.
attrIntobject required
OpenTelemetry attributes with integer values.
attrFloatobject required
OpenTelemetry attributes with floating-point values.
attrBoolobject required
OpenTelemetry attributes with boolean values.
resourceStringobject required
OpenTelemetry resource attributes captured at ingest.
eventsJsonstring required
JSON-encoded OpenTelemetry events array. Empty when the span has no events.
linksJsonstring required
JSON-encoded OpenTelemetry span-links array. Empty when the span has no links.