File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Expand file tree Collapse file tree 3 files changed +2
-15
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1515 " types" ,
1616 " types-ts3.8"
1717 ],
18- "type" : " module" ,
19- "exports" : {
20- "." : {
21- "default" : " ./build/esm/index.js" ,
22- "import" : " ./build/esm/index.js" ,
23- "require" : " ./build/cjs/index.js" ,
24- "types" : " ./build/types/index.d.ts" ,
25- "typesVersions" : {
26- "<4.9" : {
27- "types" : " ./build/types-ts3.8/index.d.ts"
28- }
29- }
30- }
31- },
3218 "main" : " build/cjs/index.js" ,
3319 "module" : " build/esm/index.js" ,
3420 "types" : " build/types/index.d.ts" ,
Original file line number Diff line number Diff line change 11import { getCurrentScope } from '@sentry/browser' ;
22import type { Span , Transaction } from '@sentry/types' ;
33import { afterUpdate , beforeUpdate , onMount } from 'svelte' ;
4+ import { current_component } from 'svelte/internal' ;
45
56import { getRootSpan } from '@sentry/core' ;
67import { DEFAULT_COMPONENT_NAME , UI_SVELTE_INIT , UI_SVELTE_UPDATE } from './constants' ;
@@ -34,7 +35,7 @@ export function trackComponent(options?: TrackComponentOptions): void {
3435
3536 // current_component.ctor.name is likely to give us the component's name automatically
3637 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
37- const componentName = `<${ customComponentName || DEFAULT_COMPONENT_NAME } >` ;
38+ const componentName = `<${ customComponentName || current_component . constructor . name || DEFAULT_COMPONENT_NAME } >` ;
3839
3940 let initSpan : Span | undefined = undefined ;
4041 if ( mergedOptions . trackInit ) {
You can’t perform that action at this time.
0 commit comments