SpanPublic

class opik.rest_api.types.span_public.SpanPublic(*, id: str | None = None, project_id: str | None = None, trace_id: str, parent_span_id: str | None = None, name: str, type: Literal['general', 'tool', 'llm'] | Any, start_time: datetime, end_time: datetime | None = None, input: Dict[str, Any | None] | None = None, output: Dict[str, Any | None] | None = None, metadata: Dict[str, Any | None] | None = None, model: str | None = None, provider: str | None = None, tags: List[str] | None = None, usage: Dict[str, int] | None = None, error_info: ErrorInfoPublic | None = None, created_at: datetime | None = None, last_updated_at: datetime | None = None, created_by: str | None = None, last_updated_by: str | None = None, feedback_scores: List[FeedbackScorePublic] | None = None, total_estimated_cost: float | None = None, duration: float | None = None, **extra_data: Any)

Bases: UniversalBaseModel

id: str | None
project_id: str | None
trace_id: str
parent_span_id: str | None
name: str
type: Literal['general', 'tool', 'llm'] | Any
start_time: datetime
end_time: datetime | None
input: Dict[str, Any | None] | None
output: Dict[str, Any | None] | None
metadata: Dict[str, Any | None] | None
model: str | None
provider: str | None
tags: List[str] | None
usage: Dict[str, int] | None
error_info: ErrorInfoPublic | None
created_at: datetime | None
last_updated_at: datetime | None
created_by: str | None
last_updated_by: str | None
feedback_scores: List[FeedbackScorePublic] | None
total_estimated_cost: float | None
duration: float | None

Duration in milliseconds as a decimal number to support sub-millisecond precision

model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].