Skip to content

Commit 1434fd9

Browse files
authored
ref(vue): Reduce bundle size for starting application render span (#14275)
1 parent b50aefd commit 1434fd9

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

packages/vue/src/tracing.ts

+10-12
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,16 @@ export const createTracingMixins = (options: TracingOptions): Mixins => {
8181
const isRoot = this.$root === this;
8282

8383
if (isRoot) {
84-
const activeSpan = getActiveSpan();
85-
if (activeSpan) {
86-
this.$_sentryRootSpan =
87-
this.$_sentryRootSpan ||
88-
startInactiveSpan({
89-
name: 'Application Render',
90-
op: `${VUE_OP}.render`,
91-
attributes: {
92-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',
93-
},
94-
});
95-
}
84+
this.$_sentryRootSpan =
85+
this.$_sentryRootSpan ||
86+
startInactiveSpan({
87+
name: 'Application Render',
88+
op: `${VUE_OP}.render`,
89+
attributes: {
90+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',
91+
},
92+
onlyIfParent: true,
93+
});
9694
}
9795

9896
// Skip components that we don't want to track to minimize the noise and give a more granular control to the user

0 commit comments

Comments
 (0)