MCPcopy
hub / github.com/vercel/next.js / getSpanContext

Method getSpanContext

packages/next/src/server/lib/trace/tracer.ts:484–490  ·  view source on GitHub ↗
(parentSpan?: Span)

Source from the content-addressed store, hash-verified

482 }
483
484 private getSpanContext(parentSpan?: Span) {
485 const spanContext = parentSpan
486 ? trace.setSpan(context.active(), parentSpan)
487 : undefined
488
489 return spanContext
490 }
491
492 public getRootSpanAttributes() {
493 const spanId = context.active().getValue(rootSpanIdKey) as number

Callers 4

traceMethod · 0.95
startSpanMethod · 0.95
withPropagatedContextMethod · 0.45
tracer.test.tsFile · 0.45

Calls 1

activeMethod · 0.45

Tested by

no test coverage detected