JobClient.query_spans
python
def JobClient.query_spans(job_id: Job | UUID | str) -> SpansQuery spans emitted while running a job. Pagination is handled automatically.
Parameters
job_id Job | UUID | str required The job, job ID, or job ID string to query spans for.
Returns
A Spans list. Each Span contains start_time, end_time, duration, trace_id, span_id, parent_span_id, name, status_code, status_message, attributes, runner_attributes, and events.
Spans.to_pandas() converts the spans to a pandas DataFrame and includes a computed duration column.