Skip to content

Span types

BaseSpan #

Bases: BaseModel

Base data class representing a span.

Parameters:

Name Type Description Default
id_ str

Id of span.

'03d2be03-11f8-46f5-a9fa-74265462467c'
parent_id str | None

Id of parent span.

None
tags Dict[str, Any]
{}
Source code in llama-index-core/llama_index/core/instrumentation/span/base.py
 6
 7
 8
 9
10
11
12
class BaseSpan(BaseModel):
    """Base data class representing a span."""

    model_config = ConfigDict(arbitrary_types_allowed=True)
    id_: str = Field(default_factory=lambda: str(uuid4()), description="Id of span.")
    parent_id: Optional[str] = Field(default=None, description="Id of parent span.")
    tags: Dict[str, Any] = Field(default={})