MCPcopy
hub / github.com/Effect-TS/effect / currentSpanFromFiber

Function currentSpanFromFiber

packages/effect/src/internal/core.ts:3136–3139  ·  view source on GitHub ↗
(fiber: Fiber.RuntimeFiber<A, E>)

Source from the content-addressed store, hash-verified

3134
3135/** @internal */
3136export const currentSpanFromFiber = <A, E>(fiber: Fiber.RuntimeFiber<A, E>): Option.Option<Tracer.Span> => {
3137 const span = fiber.currentSpan
3138 return span !== undefined && span._tag === "Span" ? Option.some(span) : Option.none()
3139}
3140
3141const NoopSpanProto: Omit<Tracer.Span, "parent" | "name" | "context"> = {
3142 _tag: "Span",

Callers 2

dieFunction · 0.85
failFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…