Skip to content

Commit aaee6fb

Browse files
committed
closer match develope
1 parent f2c1442 commit aaee6fb

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed
File renamed without changes.

packages/svelte/package.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,6 @@
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",

packages/svelte/src/performance.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getCurrentScope } from '@sentry/browser';
22
import type { Span, Transaction } from '@sentry/types';
33
import { afterUpdate, beforeUpdate, onMount } from 'svelte';
4+
import { current_component } from 'svelte/internal';
45

56
import { getRootSpan } from '@sentry/core';
67
import { 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) {

0 commit comments

Comments
 (0)