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

Function traceparentValueFor

apps/cloud/src/server.ts:102–103  ·  view source on GitHub ↗
(spanContext: SpanContext)

Source from the content-addressed store, hash-verified

100const tracer = trace.getTracer("executor-cloud-worker");
101
102const traceparentValueFor = (spanContext: SpanContext): string =>
103 `00-${spanContext.traceId}-${spanContext.spanId}-${(spanContext.traceFlags & 0xff).toString(16).padStart(2, "0")}`;
104
105const withTraceparent = (request: Request, spanContext: SpanContext): Request => {
106 const headers = new Headers(request.headers);

Callers 1

withTraceparentFunction · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected