MCPcopy Create free account
hub / github.com/Effect-TS/effect / recordException

Function recordException

packages/opentelemetry/src/internal/tracer.ts:318–327  ·  view source on GitHub ↗
(exception, timeInput)

Source from the content-addressed store, hash-verified

316 },
317 isRecording: constTrue,
318 recordException(exception, timeInput) {
319 const time = convertOtelTimeInput(timeInput, clock)
320 const cause = Cause.fail(exception)
321 const error = Cause.prettyErrors(cause)[0]
322 span.event(error.message, time, {
323 "exception.type": error.name,
324 "exception.message": error.message,
325 "exception.stacktrace": error.stack ?? ""
326 })
327 }
328 }
329 return self
330}

Callers

nothing calls this directly

Calls 3

convertOtelTimeInputFunction · 0.85
failMethod · 0.65
eventMethod · 0.65

Tested by

no test coverage detected