We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cfb6eb commit fe14f97Copy full SHA for fe14f97
packages/langbase/src/langbase/trace.ts
@@ -2,12 +2,15 @@ export interface Trace {
2
name: string;
3
startTime: number;
4
endTime?: number;
5
+ duration?: number;
6
steps: StepTrace[];
7
+ error?: string;
8
}
9
10
export interface StepTrace {
11
12
output: any;
13
14
traces: string[] | null;
15
duration: number;
16
@@ -38,6 +41,7 @@ export class TraceManager {
38
41
const trace = this.traces.get(traceId);
39
42
if (trace) {
40
43
trace.endTime = Date.now();
44
+ trace.duration = trace.endTime - trace.startTime;
45
46
47
0 commit comments