Skip to content

Commit b81c66e

Browse files
committed
refactor(copilot): simplify tool attribute naming
1 parent 28ffcf2 commit b81c66e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/sim/lib/copilot/request/metrics.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ export function recordSimToolMetric(
8787
durationMs: number
8888
): void {
8989
const { toolDuration, toolCalls } = instruments()
90-
const baseAttrs = {
90+
const attrs = {
9191
[TraceAttr.ToolName]: cappedToolName(name),
9292
[TraceAttr.ToolExecutor]: 'sim',
9393
[TraceAttr.ToolOutcome]: outcome,
9494
[TraceAttr.GenAiAgentName]: cappedAgentId(agentId),
9595
}
96-
toolCalls.add(1, baseAttrs)
97-
if (durationMs >= 0) toolDuration.record(durationMs, baseAttrs)
96+
toolCalls.add(1, attrs)
97+
if (durationMs >= 0) toolDuration.record(durationMs, attrs)
9898
}
9999

100100
// recordVfsMaterialize records VFS materialization time. Call once per phase

0 commit comments

Comments
 (0)