mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
improvement(mothership): treat error as terminal event (#4290)
This commit is contained in:
committed by
GitHub
parent
f330fe22a2
commit
af4be770a1
@@ -571,14 +571,14 @@ function stampSseReadLoopSpan(
|
||||
const nowWall = Date.now()
|
||||
const startWall = nowWall - (nowPerf - startPerfMs)
|
||||
|
||||
const terminalEventSeen = counters.eventsByType.complete > 0
|
||||
const terminalEventSeen = counters.eventsByType.complete > 0 || counters.eventsByType.error > 0
|
||||
// `terminal_event_missing` is the single-attribute dashboard signal
|
||||
// for the "disappeared response" bug class: the caller considered
|
||||
// this leg to be the final one (`context.streamComplete === true`)
|
||||
// but no `complete` event arrived on the wire. Tool-pause legs have
|
||||
// expectedTerminal=false and never trip this, so dashboards can
|
||||
// filter on `{ .copilot.sse.terminal_event_missing = true }` without
|
||||
// false positives.
|
||||
// but no terminal `complete` or `error` event arrived on the wire.
|
||||
// Tool-pause legs have expectedTerminal=false and never trip this, so
|
||||
// dashboards can filter on `{ .copilot.sse.terminal_event_missing = true }`
|
||||
// without false positives.
|
||||
const terminalEventMissing = opts.expectedTerminal && !terminalEventSeen
|
||||
|
||||
const tracer = getCopilotTracer()
|
||||
|
||||
Reference in New Issue
Block a user