MCPcopy
hub / github.com/simstudioai/sim / markSpanForError

Function markSpanForError

apps/sim/lib/copilot/request/otel.ts:95–104  ·  view source on GitHub ↗
(span: Span, error: unknown)

Source from the content-addressed store, hash-verified

93// client disconnect, internal timeout, uncategorized AbortError —
94// becomes a real error that the dashboards will surface.
95export function markSpanForError(span: Span, error: unknown): void {
96 const asError = toError(error)
97 span.recordException(asError)
98 if (!isExplicitUserStopError(error)) {
99 span.setStatus({
100 code: SpanStatusCode.ERROR,
101 message: asError.message,
102 })
103 }
104}
105
106// OTel GenAI message shape (kept minimal). Mirror changes on the Go side.
107interface GenAIAgentPart {

Callers 11

withDbSpanFunction · 0.90
fetchGoFunction · 0.90
recordSpanErrorFunction · 0.90
materializeMethod · 0.90
route.tsFile · 0.90
startInnerFunction · 0.90
withIncomingGoSpanFunction · 0.85
runBodyFunction · 0.85
withCopilotToolSpanFunction · 0.85
finishFunction · 0.85
withCopilotOtelContextFunction · 0.85

Calls 2

toErrorFunction · 0.90
isExplicitUserStopErrorFunction · 0.85

Tested by

no test coverage detected