aip_sdk.discover_metric_config_status
aip_sdk.discover_metric_config_status(*, workspace_id: str, metric_name: str | None = None, client: APIClient | None = None) -> list[MetricConfigStatus]
Report each agentic metric's config situation in a workspace, for pre-run discovery.
Joins resolve_metric_configs()'s default/override identities with each row's
usage_count — two listings a caller would otherwise fetch and join by hand.
metric_name omitted scans every agentic metric in the workspace's trace-metric
catalogue, so a metric with no default yet still gets an entry (is_required=True)
instead of being silently absent.
Parameters
workspace_idstr: The workspace to resolve against.metric_namestr | None: Only this metric; omit to scan every agentic metric in the workspace's trace-metric catalogue.clientAPIClient | None: Optional pre-configured API client.
Returns
list[MetricConfigStatus]: list[MetricConfigStatus]: one entry per agentic metric, sorted bymetric_name.
Raises
NotFoundError: If no workspace has this id.ForbiddenError: If the caller is not a member of this workspace.AuthError: If no credentials are configured.APIError: If a read fails, or a response is malformed.
Example:
for status in aip.discover_metric_config_status(workspace_id="ws-abc123"):
if status.is_required:
print(f"{status.metric_name}: no default or override — must configure inline")
else:
print(status.metric_name, status.default_config_version, status.overrides)