(callback?: T & Partial<ServerReference>)
| 12 | import { isUseCacheFunction } from './isUseCacheFunction'; |
| 13 | |
| 14 | function shouldNoopSpan<T>(callback?: T & Partial<ServerReference>): boolean { |
| 15 | const isBuildContext = isBuild(); |
| 16 | const isUseCacheFunctionContext = callback ? isUseCacheFunction(callback) : false; |
| 17 | |
| 18 | if (isUseCacheFunctionContext) { |
| 19 | DEBUG_BUILD && debug.log('Skipping span creation in Cache Components context'); |
| 20 | } |
| 21 | |
| 22 | return isBuildContext || isUseCacheFunctionContext; |
| 23 | } |
| 24 | |
| 25 | function createNonRecordingSpan(): Span { |
| 26 | return new SentryNonRecordingSpan({ |
no test coverage detected