fix: use agent role instead of adapter type in task_completed telemetry

The agent.task_completed event was sending adapterType (e.g. "claude_local")
as the agent_role dimension instead of the actual role (e.g. "engineer").

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dotta 2026-04-01 09:52:13 -05:00
parent af844b778e
commit c18b3cb414

View file

@ -1184,7 +1184,7 @@ export function issueRoutes(db: Db, storage: StorageService) {
if (tc && actor.agentId) {
const actorAgent = await agentsSvc.getById(actor.agentId);
if (actorAgent) {
trackAgentTaskCompleted(tc, { agentRole: actorAgent.adapterType });
trackAgentTaskCompleted(tc, { agentRole: actorAgent.role });
}
}
}