Skip to main content

List Workspace Metrics

GET 

/workspaces/:workspace_id/metrics

List every metric configurable in a workspace — one reconciled catalogue.

Both metric kinds — the same set seed_workspace_metric_config_defaults seeds, so a metric listed here always has a default to resolve.

AGENTIC_REUSABLE_LLM_METRICS no longer admits its five names (ordinary kind=METRIC rows now) but still selects which entries get the trace-contract overlay — see reused_llm_metric_trace_spec. kind stays "metric"; not a filter to re-apply.

Not a run-admission set: "what is configurable here", not "what a trace run can invoke". Agentic run surfaces must keep resolving against resolve_partition_metric_availability.

name on each entry is exactly the identifier a stored MetricConfigRecord carries as metric_name, so a caller joins on name against GET /metric-configs?workspace_id=... to find that metric's stored configs. version is whichever version currently resolves in this workspace — a config pinned to a different metric_version for the same name does not join on (name, version), only on name. Global metrics plus the workspace's own custom ones are included; readable by any workspace role (admin, editor, viewer).

Rows are resolved unfiltered by kind and narrowed with rows_of_kind afterwards, matching every other metric resolution site (partition_metrics.py, metric_resolution.py, runs.py). Narrowing the visible_op_rows query by kind instead would change which row wins the same-name collapse, and could advertise a metric run admission then can't resolve. Narrowing the one resolution twice also keeps the kinds disjoint, so the merge below cannot have one displace the other.

Unpaginated: bounded by the number of distinct ops visible in the workspace, the same bound GET /ops/registry accepts today. Add pagination if the registry grows past the point that bound holds.

Request​

Responses​

Successful Response