diff --git a/ui/litellm-dashboard/src/components/view_logs/columns.tsx b/ui/litellm-dashboard/src/components/view_logs/columns.tsx index 30bd48f7c7f..af383284e7e 100644 --- a/ui/litellm-dashboard/src/components/view_logs/columns.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/columns.tsx @@ -46,6 +46,7 @@ export type LogEntry = { proxy_server_request?: string | any[] | Record; session_id?: string; status?: string; + duration?: number; onKeyHashClick?: (keyHash: string) => void; onSessionClick?: (sessionId: string) => void; }; @@ -160,6 +161,15 @@ export const columns: ColumnDef[] = [ ${Number(info.getValue() || 0).toFixed(6)} ), }, + { + header: "Duration", + accessorKey: "duration", + cell: (info: any) => ( + + {String(info.getValue() || "-")} + + ), + }, { header: "Team Name", accessorKey: "metadata.user_api_key_team_alias", diff --git a/ui/litellm-dashboard/src/components/view_logs/index.tsx b/ui/litellm-dashboard/src/components/view_logs/index.tsx index 295fd755c0d..61e11b7115f 100644 --- a/ui/litellm-dashboard/src/components/view_logs/index.tsx +++ b/ui/litellm-dashboard/src/components/view_logs/index.tsx @@ -369,6 +369,7 @@ export default function SpendLogsTable({ }).map(log => ({ ...log, + duration: (Date.parse(log.endTime) - Date.parse(log.startTime)) / 1000, onKeyHashClick: (keyHash: string) => setSelectedKeyIdInfoView(keyHash), onSessionClick: (sessionId: string) => { if (sessionId) setSelectedSessionId(sessionId); @@ -931,6 +932,10 @@ export function RequestViewer({ row }: { row: Row }) { End Time: {row.original.endTime} +
+ Duration: + {row.original.duration} s. +