Skip to main content

aip_sdk.TraceIngestRun

aip_sdk.TraceIngestRun

The status and outcome of a trace-ingestion run.

run_status reports coarse progress and state the stage reached; check is_terminal rather than comparing them by hand. dataset_id and dataset_version_id are populated once the run has landed rows, and the drop counters break down how many input records were dropped and at which stage.

The drop counters say whether every record landed. The content counts describe where canonical content fields were populated among the records that did land, which the drop counters cannot express: a landing can have zero drops and still have no message, tool-call or document values anywhere in a trace. content_diagnostics states those observations in prose:

run = aip.land_traces(payloads, ingest_convention="openinference").wait_until_terminal()
for observation in run.content_diagnostics:
print(observation)

These are descriptive, not a verdict. spans_without_content is routinely non-zero on a healthy trace, since a parent span often carries topology while its children carry the prompt and response; spans_with_unknown_kind counts spans no agent convention describes, such as HTTP or client instrumentation. To learn whether a specific metric can score a target, call get_partition_metric_availability().

The counts are None on runs that landed before they were measured, which is not the same as zero — an empty content_diagnostics alone does not distinguish "nothing to note" from "never measured", so check a count for None when that difference matters.

aip_sdk.TraceIngestRun.buffer_id​

aip_sdk.TraceIngestRun.buffer_id: str

No docstring is defined in the source.

aip_sdk.TraceIngestRun.completed_at​

aip_sdk.TraceIngestRun.completed_at: datetime | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.content_diagnostics​

aip_sdk.TraceIngestRun.content_diagnostics: list[str] = Field(default_factory=list[str])

No docstring is defined in the source.

aip_sdk.TraceIngestRun.content_traces​

aip_sdk.TraceIngestRun.content_traces: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.convert_drops​

aip_sdk.TraceIngestRun.convert_drops: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.created_at​

aip_sdk.TraceIngestRun.created_at: datetime | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.dataset_id​

aip_sdk.TraceIngestRun.dataset_id: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.dataset_version_id​

aip_sdk.TraceIngestRun.dataset_version_id: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.drop_path​

aip_sdk.TraceIngestRun.drop_path: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.error​

aip_sdk.TraceIngestRun.error: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.failed​

aip_sdk.TraceIngestRun.failed: bool

Whether the run finished unsuccessfully. error carries the reason.

aip_sdk.TraceIngestRun.id​

aip_sdk.TraceIngestRun.id: str

No docstring is defined in the source.

aip_sdk.TraceIngestRun.is_terminal​

aip_sdk.TraceIngestRun.is_terminal: bool

Whether the run has finished, successfully or not, and will not change again.

aip_sdk.TraceIngestRun.iter_drops​

aip_sdk.TraceIngestRun.iter_drops(*, page_size: int = 500, client: APIClient | None = None) -> Iterator[TraceDropRecord]

Iterate every record this run failed to land, reading each drop's detail.

Pages are fetched lazily as the iterator is consumed, so a run that dropped as many records as it read is never materialised in full. A run that landed nothing yields a capped sample per drop reason rather than every record — compare what you consumed against total_drops, or call list_drops() for the two counts directly.

Parameters

  • page_size int: Records to fetch per request (1 to MAX_DROPS_PER_PAGE). Affects only request granularity, not the records yielded.
  • client APIClient | None: Optional API client. Defaults to whichever client fetched or created this run, not the session default.

Yields

Raises

aip_sdk.TraceIngestRun.landed_rows​

aip_sdk.TraceIngestRun.landed_rows: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.last_successful_state​

aip_sdk.TraceIngestRun.last_successful_state: TraceIngestState

No docstring is defined in the source.

aip_sdk.TraceIngestRun.list_drops​

aip_sdk.TraceIngestRun.list_drops(*, limit: int = 200, offset: int = 0, client: APIClient | None = None) -> TraceIngestDropPage

Read one page of the records this run failed to land.

Works whether or not the run landed a version, so it is what to reach for when failed is true and there is no dataset_version_id to read drops by. Prefer iter_drops() to walk every drop without paging by hand.

Parameters

  • limit int: Maximum records to return (1 to MAX_DROPS_PER_PAGE).
  • offset int: Number of records to skip, for pagination.
  • client APIClient | None: Optional API client. Defaults to whichever client fetched or created this run, not the session default.

Returns

  • TraceIngestDropPage: The page, alongside how many drops the run has and how many can be read.

Raises

aip_sdk.TraceIngestRun.model_config​

aip_sdk.TraceIngestRun.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.TraceIngestRun.object_store_path​

aip_sdk.TraceIngestRun.object_store_path: str | None = Field(default=None, validation_alias='minio_path')

No docstring is defined in the source.

aip_sdk.TraceIngestRun.project_id​

aip_sdk.TraceIngestRun.project_id: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.pull_drops​

aip_sdk.TraceIngestRun.pull_drops: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.run_status​

aip_sdk.TraceIngestRun.run_status: TraceIngestStatus

No docstring is defined in the source.

aip_sdk.TraceIngestRun.spans_with_unknown_kind​

aip_sdk.TraceIngestRun.spans_with_unknown_kind: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.spans_without_content​

aip_sdk.TraceIngestRun.spans_without_content: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.state​

aip_sdk.TraceIngestRun.state: TraceIngestState

No docstring is defined in the source.

aip_sdk.TraceIngestRun.sut_id​

aip_sdk.TraceIngestRun.sut_id: str | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.total_drops​

aip_sdk.TraceIngestRun.total_drops: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.total_in​

aip_sdk.TraceIngestRun.total_in: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.traces_without_content​

aip_sdk.TraceIngestRun.traces_without_content: int | None = None

No docstring is defined in the source.

aip_sdk.TraceIngestRun.wait_until_terminal​

aip_sdk.TraceIngestRun.wait_until_terminal(*, interval: float = 1.0, timeout: float = 60.0, client: APIClient | None = None) -> TraceIngestRun

Poll this run until it reaches a terminal state.

Parameters

  • interval float: Seconds between polls.
  • timeout float: Maximum seconds to wait.
  • client APIClient | None: Optional API client. Defaults to whichever client fetched or created this run (e.g. the one passed to land_traces()), not the session default — pass one explicitly only to poll with a different client.

Returns

Raises

  • TimeoutError: If the run has not reached a terminal state within timeout.
  • AuthError: If credentials are missing or invalid.
  • NotFoundError: If the run does not exist, or belongs to a workspace the caller is not a member of.
  • ResponseParseError: If the platform's response does not match this SDK version.

aip_sdk.TraceIngestRun.workspace_id​

aip_sdk.TraceIngestRun.workspace_id: str | None = None

No docstring is defined in the source.