SpanDetail
Trace identifier
Span identifier
Parent span identifier
Span timestamp
Service name
Span name
Span kind
Duration in nanoseconds
Status code
Status message
resource_attributes object
Resource attributes
span_attributes object
Span attributes
llm_attributes object
Normalized LLM-specific attributes extracted from span attributes
The model requested for the LLM call
The LLM provider name (e.g., openai, anthropic)
Number of input/prompt tokens
Number of output/completion tokens
Total cost of the LLM operation in dollars
Type of LLM operation (chat, embeddings, text_completion)
Type of output (e.g., text)
Name of the SDK that generated the trace (openllmetry, openlit)
Version of the SDK
System prompt/instructions
User prompt/message
LLM output/completion message
Total request duration in milliseconds (from span duration)
Time to generate first token in milliseconds (prompt processing/prefill time)
Average time per output token in milliseconds (decode time)
Total inference time in milliseconds (output_tokens * time_per_output_token)
events object[]
Span events
Event timestamp
Event name
attributes object
Event attributes
links object[]
Span links
Linked trace ID
Linked span ID
Trace state
attributes object
Link attributes
{
"trace_id": "string",
"span_id": "string",
"parent_span_id": "string",
"timestamp": "2024-07-29T15:51:28.071Z",
"service_name": "string",
"span_name": "string",
"span_kind": "string",
"duration_ns": 0,
"status_code": "string",
"status_message": "string",
"resource_attributes": {},
"span_attributes": {},
"llm_attributes": {
"request_model": "string",
"provider_name": "string",
"input_tokens": 0,
"output_tokens": 0,
"total_cost": "string",
"operation_name": "string",
"output_type": "string",
"sdk_name": "string",
"sdk_version": "string",
"system_prompt": "string",
"user_prompt": "string",
"output_message": "string",
"total_duration_ms": 0,
"time_to_first_token_ms": 0,
"time_per_output_token_ms": 0,
"inference_duration_ms": 0
},
"events": [
{
"timestamp": "2024-07-29T15:51:28.071Z",
"name": "string",
"attributes": {}
}
],
"links": [
{
"trace_id": "string",
"span_id": "string",
"trace_state": "string",
"attributes": {}
}
]
}