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

Method getContextFromCarrier

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

* @internal

(carrier: OTELCarrier | undefined)

Source from the content-addressed store, hash-verified

141 * @internal
142 */
143 getContextFromCarrier(carrier: OTELCarrier | undefined): Context {
144 if (!this.#otel) {
145 return this.#noopContext
146 }
147 const activeContext = this.#otel.context.active()
148 if (!carrier) {
149 return activeContext
150 }
151 return this.#otel.propagation.extract(activeContext, carrier)
152 }
153
154 /**
155 * @internal

Callers 5

getContextFromEnvMethod · 0.95
createTestersMethod · 0.80
tester.tsFile · 0.80
onMessageFunction · 0.80

Calls 1

activeMethod · 0.45

Tested by

no test coverage detected