MCPcopy Create free account
hub / github.com/cloudflare/computer / wrapFuseOpsWithTracer

Function wrapFuseOpsWithTracer

packages/computerd/src/fuse/tracer.ts:187–200  ·  view source on GitHub ↗
(
  ops: T,
  tracer: FuseTracer,
)

Source from the content-addressed store, hash-verified

185 * functions short-circuit, so wrapping twice is a no-op.
186 */
187export function wrapFuseOpsWithTracer<T extends Record<string, unknown>>(
188 ops: T,
189 tracer: FuseTracer,
190): T {
191 const out: Record<string, unknown> = {};
192 for (const [name, value] of Object.entries(ops)) {
193 if (typeof value === "function") {
194 out[name] = tracer.wrap(name, value as never);
195 } else {
196 out[name] = value;
197 }
198 }
199 return out as T;
200}

Callers 2

mountFuseFunction · 0.85
tracer.test.tsFile · 0.85

Calls 1

wrapMethod · 0.80

Tested by

no test coverage detected