Skip to main content

LLMAttributes

Normalized LLM-specific attributes extracted from span attributes

request_modelstring

The model requested for the LLM call

provider_namestring

The LLM provider name (e.g., openai, anthropic)

input_tokensinteger<int64>

Number of input/prompt tokens

output_tokensinteger<int64>

Number of output/completion tokens

total_coststring

Total cost of the LLM operation in dollars

operation_namestring

Type of LLM operation (chat, embeddings, text_completion)

output_typestring

Type of output (e.g., text)

sdk_namestring

Name of the SDK that generated the trace (openllmetry, openlit)

sdk_versionstring

Version of the SDK

system_promptstring

System prompt/instructions

user_promptstring

User prompt/message

output_messagestring

LLM output/completion message

total_duration_msinteger<int64>

Total request duration in milliseconds (from span duration)

time_to_first_token_msinteger<int64>

Time to generate first token in milliseconds (prompt processing/prefill time)

time_per_output_token_msinteger<int64>

Average time per output token in milliseconds (decode time)

inference_duration_msinteger<int64>

Total inference time in milliseconds (output_tokens * time_per_output_token)

LLMAttributes
{
"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
}
Was this page helpful?