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

Function runBody

apps/sim/lib/copilot/request/otel.ts:259–270  ·  view source on GitHub ↗
(span: Span)

Source from the content-addressed store, hash-verified

257): Promise<T> {
258 const tracer = getTracer()
259 const runBody = async (span: Span) => {
260 try {
261 const result = await fn(span)
262 span.setStatus({ code: SpanStatusCode.OK })
263 return result
264 } catch (error) {
265 markSpanForError(span, error)
266 throw error
267 } finally {
268 span.end()
269 }
270 }
271 if (parentContext) {
272 return tracer.startActiveSpan(spanName, { attributes }, parentContext, runBody)
273 }

Callers

nothing calls this directly

Calls 2

markSpanForErrorFunction · 0.85
fnFunction · 0.50

Tested by

no test coverage detected