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

Function maybeEndRootComponentSpan

packages/vue/src/tracing.ts:35–46  ·  view source on GitHub ↗

End the top-level component span and activity with a debounce configured using `timeout` option

(vm: VueSentry, timestamp: number, timeout: number)

Source from the content-addressed store, hash-verified

33
34/** End the top-level component span and activity with a debounce configured using `timeout` option */
35function 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. */
49export function findTrackComponent(trackComponents: string[], formattedName: string): boolean {

Callers 1

createTracingMixinsFunction · 0.85

Calls 2

setTimeoutFunction · 0.85
endMethod · 0.65

Tested by

no test coverage detected