(options: StartSpanOptions, callback: (span: Span, finish: () => void) => T)
| 58 | * @returns The return value of the callback |
| 59 | */ |
| 60 | export 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 | * |
nothing calls this directly
no test coverage detected