(span: Span, error: unknown)
| 93 | // client disconnect, internal timeout, uncategorized AbortError — |
| 94 | // becomes a real error that the dashboards will surface. |
| 95 | export 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. |
| 107 | interface GenAIAgentPart { |
no test coverage detected