File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1
- import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , getActiveSpan } from '@sentry/browser' ;
1
+ import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser' ;
2
2
import type { Span } from '@sentry/types' ;
3
3
import { afterUpdate , beforeUpdate , onMount } from 'svelte' ;
4
4
import { current_component } from 'svelte/internal' ;
@@ -59,13 +59,8 @@ function recordInitSpan(componentName: string): void {
59
59
function recordUpdateSpans ( componentName : string ) : void {
60
60
let updateSpan : Span | undefined ;
61
61
beforeUpdate ( ( ) => {
62
- // If there is no active span, we skip
63
- const activeSpan = getActiveSpan ( ) ;
64
- if ( ! activeSpan ) {
65
- return ;
66
- }
67
-
68
62
updateSpan = startInactiveSpan ( {
63
+ onlyIfParent : true ,
69
64
op : UI_SVELTE_UPDATE ,
70
65
name : componentName ,
71
66
attributes : { [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.ui.svelte' } ,
You can’t perform that action at this time.
0 commit comments