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

Method startSpan

packages/next/src/server/lib/trace/tracer.ts:475–482  ·  view source on GitHub ↗
(...args: Array<any>)

Source from the content-addressed store, hash-verified

473 public startSpan(type: SpanTypes): Span
474 public startSpan(type: SpanTypes, options: TracerSpanOptions): Span
475 public startSpan(...args: Array<any>): Span {
476 const [type, options]: [string, TracerSpanOptions | undefined] = args as any
477
478 const spanContext = this.getSpanContext(
479 options?.parentSpan ?? this.getActiveScopeSpan()
480 )
481 return this.getTracerInstance().startSpan(type, options, spanContext)
482 }
483
484 private getSpanContext(parentSpan?: Span) {
485 const spanContext = parentSpan

Callers

nothing calls this directly

Calls 4

getSpanContextMethod · 0.95
getActiveScopeSpanMethod · 0.95
getTracerInstanceMethod · 0.95
startSpanMethod · 0.65

Tested by

no test coverage detected