Skip to content

Commit 6f63c6a

Browse files
authored
fix(ember): Do not create rendering spans without transaction (#11749)
This was brought up in discord - we forgot to add `onlyIfParent` to the ui spans we emit for ember, so it's possible to capture a bunch of them as transactions, accidentally.
1 parent 7de7dcc commit 6f63c6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export function _instrumentEmberRouter(
163163
},
164164
op: 'ui.ember.transition',
165165
name: `route:${fromRoute} -> route:${toRoute}`,
166+
onlyIfParent: true,
166167
});
167168
});
168169

@@ -224,6 +225,7 @@ function _instrumentEmberRunloop(config: EmberSentryConfig): void {
224225
name: 'runloop',
225226
op: `ui.ember.runloop.${queue}`,
226227
startTime: currentQueueStart,
228+
onlyIfParent: true,
227229
})?.end(now);
228230
}
229231
currentQueueStart = undefined;
@@ -299,6 +301,7 @@ function processComponentRenderAfter(
299301
attributes: {
300302
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
301303
},
304+
onlyIfParent: true,
302305
})?.end(now);
303306
}
304307
}
@@ -384,6 +387,7 @@ function _instrumentInitialLoad(config: EmberSentryConfig): void {
384387
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.ember',
385388
},
386389
startTime,
390+
onlyIfParent: true,
387391
})?.end(endTime);
388392
performance.clearMarks(startName);
389393
performance.clearMarks(endName);

0 commit comments

Comments
 (0)