Skip to content

Commit 3324324

Browse files
authored
fix(ember): Disable performance in FastBoot (#7282)
We do not want to run the instance initializer in fastboot env, as that relies on Browser stuff.
1 parent e4941fc commit 3324324

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ function getSentryConfig() {
2525
}
2626

2727
export function initialize(appInstance: ApplicationInstance): void {
28+
// Disable in fastboot - we only want to run Sentry client-side
29+
const fastboot = appInstance.lookup('service:fastboot') as { isFastBoot: boolean } | undefined;
30+
if (fastboot?.isFastBoot) {
31+
return;
32+
}
33+
2834
const config = getSentryConfig();
2935
if (config['disablePerformance']) {
3036
return;

0 commit comments

Comments
 (0)