End the top-level component span and activity with a debounce configured using `timeout` option
(vm: VueSentry, timestamp: number, timeout: number)
| 33 | |
| 34 | /** End the top-level component span and activity with a debounce configured using `timeout` option */ |
| 35 | function maybeEndRootComponentSpan(vm: VueSentry, timestamp: number, timeout: number): void { |
| 36 | if (vm.$_sentryRootComponentSpanTimer) { |
| 37 | clearTimeout(vm.$_sentryRootComponentSpanTimer); |
| 38 | } |
| 39 | |
| 40 | vm.$_sentryRootComponentSpanTimer = setTimeout(() => { |
| 41 | if (vm.$root?.$_sentryRootComponentSpan) { |
| 42 | vm.$root.$_sentryRootComponentSpan.end(timestamp); |
| 43 | vm.$root.$_sentryRootComponentSpan = undefined; |
| 44 | } |
| 45 | }, timeout); |
| 46 | } |
| 47 | |
| 48 | /** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */ |
| 49 | export function findTrackComponent(trackComponents: string[], formattedName: string): boolean { |
no test coverage detected