Skip to main content

SpanDetail

trace_idstring

Trace identifier

span_idstring

Span identifier

parent_span_idstring

Parent span identifier

timestampstring<date-time>

Span timestamp

service_namestring

Service name

span_namestring

Span name

span_kindstring

Span kind

duration_nsinteger<int64>

Duration in nanoseconds

status_codestring

Status code

status_messagestring

Status message

resource_attributes object

Resource attributes

property name*string
span_attributes object

Span attributes

property name*string
llm_attributes object

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)

events object[]

Span events

  • Array [
  • timestampstring<date-time>

    Event timestamp

    namestring

    Event name

    attributes object

    Event attributes

    property name*string
  • ]
  • links object[]

    Span links

  • Array [
  • trace_idstring

    Linked trace ID

    span_idstring

    Linked span ID

    trace_statestring

    Trace state

    attributes object

    Link attributes

    property name*string
  • ]
  • SpanDetail
    {
    "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": {}
    }
    ]
    }
    Was this page helpful?