Skip to content

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

perf: improve dashboard performance (#1281)

Max Deichmann2e80d4b47516
diff --git a/web/src/features/dashboard/components/MetricTable.tsx b/web/src/features/dashboard/components/MetricTable.tsx
index f2f2abdd01..62d839a8d8 100644
--- a/web/src/features/dashboard/components/MetricTable.tsx
+++ b/web/src/features/dashboard/components/MetricTable.tsx
@@ -25,7 +25,15 @@ export const MetricTable = ({
{ column: "totalTokens", agg: "SUM" },
{ column: "model" },
],
- filter: globalFilterState,
+ filter: [
+ ...globalFilterState,
+ {
+ type: "string",
+ column: "type",
+ operator: "=",
+ value: "GENERATION",
+ },
+ ],
groupBy: [{ type: "string", column: "model" }],
orderBy: [
{ column: "calculatedTotalCost", direction: "DESC", agg: "SUM" },
diff --git a/web/src/features/dashboard/components/ModelUsageChart.tsx b/web/src/features/dashboard/components/ModelUsageChart.tsx
index cbe2d3acfe..132239347b 100644
--- a/web/src/features/dashboard/components/ModelUsageChart.tsx
+++ b/web/src/features/dashboard/components/ModelUsageChart.tsx
@@ -39,7 +39,10 @@ export const ModelUsageChart = ({
{ column: "calculatedTotalCost", agg: "SUM" },
{ column: "model" },
],
- filter: globalFilterState,
+ filter: [
+ ...globalFilterState,
+ { type: "string", column: "type", operator: "=", value: "GENERATION" },
+ ],
groupBy: [
{
type: "datetime",
diff --git a/web/src/features/dashboard/components/UserChart.tsx b/web/src/features/dashboard/components/UserChart.tsx
index 9c2c77e779..bd197a4234 100644
--- a/web/src/features/dashboard/components/UserChart.tsx
+++ b/web/src/features/dashboard/components/UserChart.tsx
@@ -37,7 +37,15 @@ export const UserChart = ({
{ column: "user" },
{ column: "traceId", agg: "COUNT" },
],
- filter: globalFilterState,
+ filter: [
+ ...globalFilterState,
+ {
+ type: "string",
+ column: "type",
+ operator: "=",
+ value: "GENERATION",
+ },
+ ],
groupBy: [
{
type: "string",