Skip to content

Commit

Permalink
feat(vue): Only start UI spans if parent is available (#13568)
Browse files Browse the repository at this point in the history
UI spans make sense if they are a child of e.g. a pageload root span.
This change ensures UI spans are not created as root spans.

ref #13546
  • Loading branch information
s1gr1d authored Sep 3, 2024
1 parent 4774399 commit b7d1544
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vue/src/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export const createTracingMixins = (options: TracingOptions): Mixins => {
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.vue',
},
// UI spans should only be created if there is an active root span (transaction)
onlyIfParent: true,
});
}
} else {
Expand Down

0 comments on commit b7d1544

Please sign in to comment.