Overview
Logging types enable comprehensive tracking of AI applications, from high-level traces to granular span content with various operation types.Span Content Types
LogSpanContent (Union)
Polymorphic content type for different span categories.LogSpanModelContent
See the dedicated LogSpanModelContent page for full documentation. LLM inference span content.input and output are LogSpanContentJson — a string that must be valid, parseable JSON (i.e. the result of JSON.stringify()). Passing a plain string that isn’t valid JSON will cause the span to be rejected.
For Model spans specifically, you get the most out of Adaline when you pass the exact request payload you send to your provider as input, and the full provider response object as output. When you do this with a supported provider (OpenAI, Anthropic, Google, etc.), Adaline automatically:
- Calculates cost from token counts and the model’s pricing
- Extracts token usage (prompt, completion, and total tokens)
- Surfaces model metadata such as stop reason, tool calls, and function invocations
- Powers continuous evaluations with structured input/output pairs
input. For output, stringify the full response returned by the SDK.
You can also set input and output to use Adaline’s own content schema, although this is more advanced and requires maintaining custom transformations to convert provider payloads into the Adaline format.
Examples
- OpenAI
- Anthropic
LogSpanModelStreamContent
See the dedicated LogSpanModelStreamContent page for full documentation. Streaming LLM inference content.LogSpanEmbeddingsContent
See the dedicated LogSpanEmbeddingsContent page for full documentation. Embedding generation span content.LogSpanFunctionContent
See the dedicated LogSpanFunctionContent page for full documentation. Custom function execution span content.LogSpanToolContent
See the dedicated LogSpanToolContent page for full documentation. Tool execution span content.LogSpanGuardrailContent
See the dedicated LogSpanGuardrailContent page for full documentation. Safety/compliance check span content.LogSpanRetrievalContent
See the dedicated LogSpanRetrievalContent page for full documentation. RAG/retrieval span content.LogSpanOtherContent
See the dedicated LogSpanOtherContent page for full documentation. Custom span content.Supporting Types
LogSpanContentJson
JSON string that must be valid JSON.LogSpanVariable
See the dedicated LogSpanVariable page for full documentation. Variable attached to a Model or ModelStream span for evaluation tracking.LogSpanVariableValue
Content value for a span variable. A discriminated union onmodality:
LogAttributesValue
See the dedicated LogAttributesValue page for full documentation. The allowed value types for trace/span attributes.Record<string, LogAttributesValue> for the attributes parameter on traces and spans.
Example:
TraceStatus
See the dedicated TraceStatus page for full documentation. Allowed status values for a trace.SpanStatus
See the dedicated SpanStatus page for full documentation. Allowed status values for a span.Span status does not include
'pending' — that value is only available for traces.