Skip to content

Commit

Permalink
Merge pull request #2321 from Agenta-AI/fix/-latency-for-observabilit…
Browse files Browse the repository at this point in the history
…y-traces

(frontend)[AGE-1374]: Regression wrong time shown in traces
  • Loading branch information
mmabrouk authored Nov 28, 2024
2 parents d44ecb1 + a61b9ce commit 1eff080
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ const App: React.FC<TestViewProps> = ({
const firstTraceNode = tree.nodes[0]
newDataList[index] = {
cost: firstTraceNode?.metrics?.acc?.costs?.total ?? null,
latency: firstTraceNode?.metrics?.acc?.duration?.total / 1000 ?? null,
latency: firstTraceNode?.metrics?.acc?.duration?.total / 1000 || null,
usage: firstTraceNode?.metrics?.acc?.tokens?.total ?? null,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ const ObservabilityDashboard = () => {
<div>
{formatLatency(
record?.metrics?.acc?.duration?.total
? record?.metrics?.acc?.duration?.total
: record?.metrics?.acc?.tokens?.total / 1000,
? record?.metrics?.acc?.duration?.total / 1000
: null,
)}
</div>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ const TraceContent = ({activeTrace}: TraceContentProps) => {
<Timer size={14} />{" "}
{formatLatency(
activeTrace?.metrics?.acc?.duration?.total
? activeTrace?.metrics?.acc?.duration?.total
: activeTrace?.metrics?.acc?.tokens?.total / 1000,
? activeTrace?.metrics?.acc?.duration?.total / 1000
: null,
)}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const TreeContent = ({value}: {value: _AgentaRootsResponse}) => {
<Timer />
{formatLatency(
metrics?.acc?.duration?.total
? metrics?.acc?.duration?.total
: metrics?.acc?.tokens?.total / 1000,
? metrics?.acc?.duration?.total / 1000
: null,
)}
</div>

Expand Down

0 comments on commit 1eff080

Please sign in to comment.