🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore: allow trace deletions on entire history (#7252)
Max Deichmanna10951b7e5b5
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsxindex 520bead46a..999992dd76 100644--- a/web/src/components/table/use-cases/traces.tsx+++ b/web/src/components/table/use-cases/traces.tsx@@ -14,7 +14,11 @@ import { type Row, type RowSelectionState } from "@tanstack/react-table";import { useEffect, useMemo, useState } from "react";import { NumberParam, useQueryParams, withDefault } from "use-query-params";import type Decimal from "decimal.js";-import { numberFormatter, usdFormatter } from "@/src/utils/numbers";+import {+ compactNumberFormatter,+ numberFormatter,+ usdFormatter,+} from "@/src/utils/numbers";import { DeleteTraceButton } from "@/src/components/deleteButton";import {formatAsLabel,@@ -405,6 +409,12 @@ export default function TracesTable({setSelectedRows({});};+ const displayCount = totalCountQuery.isLoading ? (+ <span className="inline-block font-mono">...</span>+ ) : (+ compactNumberFormatter(totalCountQuery.data?.totalCount)+ );+const tableActions: TableAction[] = [...(hasTraceDeletionEntitlement? [@@ -412,8 +422,7 @@ export default function TracesTable({id: "trace-delete",type: BatchActionType.Delete,label: "Delete Traces",- description:- "This action permanently deletes traces and cannot be undone. Trace deletion happens asynchronously and may take up to 15 minutes.",+ description: `This action permanently deletes ${displayCount} traces and cannot be undone. Trace deletion happens asynchronously and may take up to 15 minutes.`,accessCheck: {scope: "traces:delete",entitlement: "trace-deletion",diff --git a/worker/src/features/batchAction/handleBatchActionJob.ts b/worker/src/features/batchAction/handleBatchActionJob.tsindex 1d465a4c3a..025419c857 100644--- a/worker/src/features/batchAction/handleBatchActionJob.ts+++ b/worker/src/features/batchAction/handleBatchActionJob.ts@@ -149,7 +149,6 @@ export const handleBatchActionJob = async (cutoffCreatedAt: new Date(cutoffCreatedAt),filter: convertDatesInFiltersFromStrings(query.filter ?? []),orderBy: query.orderBy,- rowLimit: env.BATCH_ACTION_EXPORT_ROW_LIMIT,}): await getDatabaseReadStream({projectId: projectId,@@ -157,7 +156,6 @@ export const handleBatchActionJob = async (filter: convertDatesInFiltersFromStrings(query.filter ?? []),orderBy: query.orderBy,tableName: tableName,- rowLimit: env.BATCH_ACTION_EXPORT_ROW_LIMIT,});// Process stream in database-sized batches