MCPcopy
hub / github.com/vitest-dev/vitest / startSpan

Method startSpan

packages/vitest/src/utils/traces.ts:266–272  ·  view source on GitHub ↗

* @internal

(name: string, options?: SpanOptions, context?: Context)

Source from the content-addressed store, hash-verified

264 * @internal
265 */
266 startSpan(name: string, options?: SpanOptions, context?: Context): Span {
267 if (!this.#otel) {
268 return this.#noopSpan
269 }
270 const { tracer } = this.#otel
271 return tracer.startSpan(name, options, context)
272 }
273
274 // On browser mode, async context is not automatically propagated,
275 // so we manually bind the `$` calls to the provided context.

Callers 3

recordInitSpanMethod · 0.95
startContextSpanMethod · 0.80
startTracesSpanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected