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

Function findTrackComponent

packages/vue/src/tracing.ts:49–59  ·  view source on GitHub ↗
(trackComponents: string[], formattedName: string)

Source from the content-addressed store, hash-verified

47
48/** Find if the current component exists in the provided `TracingOptions.trackComponents` array option. */
49export function findTrackComponent(trackComponents: string[], formattedName: string): boolean {
50 function extractComponentName(name: string): string {
51 return name.replace(/^<([^\s]*)>(?: at [^\s]*)?$/, '$1');
52 }
53
54 const isMatched = trackComponents.some(compo => {
55 return extractComponentName(formattedName) === extractComponentName(compo);
56 });
57
58 return isMatched;
59}
60
61export const createTracingMixins = (options: Partial<TracingOptions> = {}): Mixins => {
62 const hooks = (options.hooks || [])

Callers 2

createTracingMixinsFunction · 0.85

Calls 1

extractComponentNameFunction · 0.85

Tested by

no test coverage detected