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

Function traceFields

packages/effect/src/rpc/RpcClient.ts:308–313  ·  view source on GitHub ↗
(fiber: Fiber.Fiber<unknown, unknown>, clientSpan: Tracer.Span | undefined)

Source from the content-addressed store, hash-verified

306 }, Effect.uninterruptible)
307
308 const traceFields = (fiber: Fiber.Fiber<unknown, unknown>, clientSpan: Tracer.Span | undefined) => {
309 if (disableTracing || !fiber.cache.tracerEnabled || fiber.getRef(Tracer.DisablePropagation)) return undefined
310 const span = clientSpan ?? fiber.cache.span
311 if (!span || Context.get(span.annotations, Tracer.DisablePropagation)) return undefined
312 return { traceId: span.traceId, spanId: span.spanId, sampled: span.sampled }
313 }
314
315 const onRequest = (rpc: Rpc.AnyWithProps) => {
316 const isStream = RpcSchema.isStreamSchema(rpc.successSchema)

Callers 2

onEffectRequestFunction · 0.85
RpcClient.tsFile · 0.85

Calls 2

getRefMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected