Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(dashboards): drop scoreName filter on traces and observations views (#13901)

Steffen Schmitz0a45d7ddedee
diff --git a/web/src/features/dashboard/lib/dashboardUiTableToViewMapping.ts b/web/src/features/dashboard/lib/dashboardUiTableToViewMapping.ts
index 53c3add600..f2763efb55 100644
--- a/web/src/features/dashboard/lib/dashboardUiTableToViewMapping.ts
+++ b/web/src/features/dashboard/lib/dashboardUiTableToViewMapping.ts
@@ -64,14 +64,12 @@ const viewFilterDefinitions: Record<
> = {
traces: [
defineField("name", sourceSpec("Trace Name", { uiTableId: "traceName" })),
- defineField(
- "observationName",
- sourceSpec("Observation Name", { uiTableId: "observationName" }),
- ),
- defineField(
- "scoreName",
- sourceSpec("Score Name", { uiTableId: "scoreName" }),
- ),
+ // observationName intentionally omitted: traces:observations is 1:n and traceView has no
+ // observationName dimension.
+ // scoreName intentionally omitted: traces:scores is 1:n, and traceView has
+ // no scoreName dimension.
+ // The legacy *Name->name fallback would silently rewrite this to traces.name.
+ // Filter on the scores-numeric / scores-categorical views instead.
defineField("tags", sourceSpec("Tags", { uiTableId: "traceTags" })),
defineField(
"userId",
@@ -100,10 +98,8 @@ const viewFilterDefinitions: Record<
"name",
sourceSpec("Observation Name", { uiTableId: "observationName" }),
),
- defineField(
- "scoreName",
- sourceSpec("Score Name", { uiTableId: "scoreName" }),
- ),
+ // scoreName intentionally omitted: observations:scores is 1:n, and
+ // observationsView has no scoreName dimension. See LFE-9773.
defineField(
"userId",
sourceSpec("User", { uiTableId: "user" }),
diff --git a/web/src/features/widgets/components/widgetFilterColumns.ts b/web/src/features/widgets/components/widgetFilterColumns.ts
index d2827f0790..7142e04644 100644
--- a/web/src/features/widgets/components/widgetFilterColumns.ts
+++ b/web/src/features/widgets/components/widgetFilterColumns.ts
@@ -61,22 +61,11 @@ const getWidgetFilterColumnSpecs = ({
},
customSelect: true,
},
- {
- column: {
- name: "Observation Name",
- id: "observationName",
- type: "string",
- internal: "internalValue",
- },
- },
- {
- column: {
- name: "Score Name",
- id: "scoreName",
- type: "string",
- internal: "internalValue",
- },
- },
+ // "Observation Name" and "Score Name" are intentionally NOT in the base
+ // list because they are not valid filter columns on the traces view
+ // (traces:observations and traces:scores are both 1:n -- see LFE-9773).
+ // They are added below per-view where the dashboardUiTableToViewMapping
+ // actually resolves them to a real dimension.
{
column: {
name: "Tags",
@@ -132,6 +121,44 @@ const getWidgetFilterColumnSpecs = ({
});
}
+ if (selectedView === "observations") {
+ // "Observation Name" on the observations view filters observations.name
+ // (mapped through dashboardUiTableToViewMapping). "Score Name" is omitted
+ // here because observations:scores is 1:n -- see LFE-9773.
+ filterColumns.push({
+ column: {
+ name: "Observation Name",
+ id: "observationName",
+ type: "string",
+ internal: "internalValue",
+ },
+ });
+ }
+
+ if (
+ selectedView === "scores-numeric" ||
+ selectedView === "scores-categorical"
+ ) {
+ filterColumns.push(
+ {
+ column: {
+ name: "Score Name",
+ id: "scoreName",
+ type: "string",
+ internal: "internalValue",
+ },
+ },
+ {
+ column: {
+ name: "Observation Name",
+ id: "observationName",
+ type: "string",
+ internal: "internalValue",
+ },
+ },
+ );
+ }
+
if (selectedView === "observations") {
filterColumns.push(
// v2-only filter columns (experiment data only exists in events table)