MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getActiveSpanWrapper

Function getActiveSpanWrapper

packages/opentelemetry/src/trace.ts:354–360  ·  view source on GitHub ↗
(parentSpan: Span | SentrySpan | undefined | null)

Source from the content-addressed store, hash-verified

352}
353
354function getActiveSpanWrapper<T>(parentSpan: Span | SentrySpan | undefined | null): (callback: () => T) => T {
355 return parentSpan !== undefined
356 ? (callback: () => T) => {
357 return withActiveSpan(parentSpan, callback);
358 }
359 : (callback: () => T) => callback();
360}

Callers 2

_startSpanFunction · 0.70
startInactiveSpanFunction · 0.70

Calls 2

withActiveSpanFunction · 0.70
callbackFunction · 0.50

Tested by

no test coverage detected