Spans
Reference for client.spans in the Future AGI Python and TypeScript SDKs: spans.get, spans.list.
client.spans on fi.Client (Python) and client.spans on Client from @future-agi/sdk (TypeScript). The models these methods return are on Observability response models; how arguments, pagination, errors and strict mode work is in the overview.
Methods
| Method | Description |
|---|---|
spans.get | Return an observation span by its identifier. |
spans.list | List observation spans using the supplied filters. |
client.spans
spans.get
Return an observation span by its identifier.
/tracer/observation-span/{id}/ MCP tool: get_span
result = client.spans.get("your-id")const result = await client.spans.get("your-id"); Signature
client.spans.get(
id: str,
*,
test_execution_id: str | None | NotGiven = NOT_GIVEN,
call_execution_id: str | None | NotGiven = NOT_GIVEN,
project_id: str | None | NotGiven = NOT_GIVEN,
trace_id: str | None | NotGiven = NOT_GIVEN,
start_hour: str | None | NotGiven = NOT_GIVEN,
observation_type: str | None | NotGiven = NOT_GIVEN,
service_name: str | None | NotGiven = NOT_GIVEN,
expected_start_time: str | None | NotGiven = NOT_GIVEN,
expected_version: str | None | NotGiven = NOT_GIVEN,
extra_query: dict[str, Any] | None = None,
options: RequestOptions | None = None,
) -> models.ObservationSpanDetailResultclient.spans.get(id: string, params: SpansGetParams = {}, options?: RequestOptions): Promise<models.ObservationSpanDetailResult>
export interface SpansGetParams {
/** A run the caller can read; opens the hidden simulation project of that run's agent. */
test_execution_id?: string | null;
/** A run the caller can read; opens the hidden simulation project of that run's agent. */
call_execution_id?: string | null;
project_id?: string | null;
trace_id?: string | null;
start_hour?: string | null;
observation_type?: string | null;
service_name?: string | null;
expected_start_time?: string | null;
expected_version?: string | null;
} Parameters
Positional argument id.
A run the caller can read; opens the hidden simulation project of that run’s agent.
A run the caller can read; opens the hidden simulation project of that run’s agent.
Returns
spans.list
List observation spans using the supplied filters.
/tracer/observation-span/list_spans_observe/ MCP tool: list_spans
result = client.spans.list()const result = await client.spans.list(); Signature
client.spans.list(
*,
project_id: str | None | NotGiven = NOT_GIVEN,
user_id: str | None | NotGiven = NOT_GIVEN,
filters: str | None | NotGiven = NOT_GIVEN,
page_number: int | None | NotGiven = NOT_GIVEN,
page_size: int | None | NotGiven = NOT_GIVEN,
cursor: str | None | NotGiven = NOT_GIVEN,
cursor_mode: bool | None | NotGiven = NOT_GIVEN,
allow_sampled: bool | None | NotGiven = NOT_GIVEN,
extra_query: dict[str, Any] | None = None,
options: RequestOptions | None = None,
) -> models.SpanObserveListResultclient.spans.list(params: SpansListParams = {}, options?: RequestOptions): Promise<models.SpanObserveListResult>
export interface SpansListParams {
project_id?: string | null;
user_id?: string | null;
filters?: string | null;
/** Zero-based numbered page. Pages whose required ordered work exceeds the finite read contract return HTTP 422 with code page_depth_exceeded; request an earlier page or narrow the time range. */
page_number?: number | null;
page_size?: number | null;
/** Opaque continuation token returned by the previous page. When supplied, do not also send the numbered-page parameter. */
cursor?: string | null;
cursor_mode?: boolean | null;
/** Omit for backward-compatible complete bounded pages, which may label total_rows as a lower bound. Send false to require an exact total, or true to opt in explicitly to lower-bound totals. */
allow_sampled?: boolean | null;
} Parameters
Zero-based numbered page. Pages whose required ordered work exceeds the finite read contract return HTTP 422 with code page_depth_exceeded; request an earlier page or narrow the time range.
Opaque continuation token returned by the previous page. When supplied, do not also send the numbered-page parameter.
Omit for backward-compatible complete bounded pages, which may label total_rows as a lower bound. Send false to require an exact total, or true to opt in explicitly to lower-bound totals.
Returns
Questions & Discussion