MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / startSpanManual

Function startSpanManual

packages/nextjs/src/common/utils/nextSpan.ts:60–67  ·  view source on GitHub ↗
(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T)

Source from the content-addressed store, hash-verified

58 * @returns The return value of the callback
59 */
60export function startSpanManual<T>(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T): T {
61 if (shouldNoopSpan(callback)) {
62 const nonRecordingSpan = createNonRecordingSpan();
63 return callback(nonRecordingSpan, () => nonRecordingSpan.end());
64 }
65
66 return coreStartSpanManual(options, callback);
67}
68
69/**
70 *

Callers

nothing calls this directly

Calls 4

shouldNoopSpanFunction · 0.85
createNonRecordingSpanFunction · 0.85
endMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected