MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / newTraceContext

Function newTraceContext

e2e/cloud/mcp-session-cold-init.test.ts:72–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70/** A client-supplied W3C trace context, so every span this one request produces
71 * — worker plane and Durable Object alike — is addressable by one trace id. */
72const newTraceContext = (): { readonly traceId: string; readonly traceparent: string } => {
73 const traceId = randomBytes(16).toString("hex");
74 const spanId = randomBytes(8).toString("hex");
75 return { traceId, traceparent: `00-${traceId}-${spanId}-01` };
76};
77
78const mcpPost = (
79 url: string,

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected