@@ -6,17 +6,13 @@ import type {
66 startBrowserTracingNavigationSpan as startBrowserTracingNavigationSpanType ,
77 startBrowserTracingPageLoadSpan as startBrowserTracingPageLoadSpanType ,
88} from '@sentry/browser' ;
9- import {
10- getClient ,
11- SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
12- SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
13- startInactiveSpan ,
14- } from '@sentry/browser' ;
9+ import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN , SEMANTIC_ATTRIBUTE_SENTRY_SOURCE , startInactiveSpan } from '@sentry/browser' ;
1510import type { Span } from '@sentry/core' ;
1611import type { EmberRouterMain } from '../types' ;
1712import { getBackburner } from './performance' ;
1813
1914export function instrumentEmberAppInstanceForPerformance (
15+ client : BrowserClient ,
2016 appInstance : ApplicationInstance ,
2117 config : { disableRunloopPerformance ?: boolean ; instrumentPageLoad ?: boolean ; instrumentNavigation ?: boolean } ,
2218 startBrowserTracingPageLoadSpan : typeof startBrowserTracingPageLoadSpanType ,
@@ -44,6 +40,7 @@ export function instrumentEmberAppInstanceForPerformance(
4440
4541 routerService . _hasMountedSentryPerformanceRouting = true ;
4642 _instrumentEmberRouter (
43+ client ,
4744 routerService ,
4845 routerMain ,
4946 config ,
@@ -79,6 +76,7 @@ export function _getLocationURL(location: EmberRouterMain['location']): string {
7976}
8077
8178function _instrumentEmberRouter (
79+ client : BrowserClient ,
8280 routerService : RouterService ,
8381 routerMain : EmberRouterMain ,
8482 config : { disableRunloopPerformance ?: boolean ; instrumentPageLoad ?: boolean ; instrumentNavigation ?: boolean } ,
@@ -92,12 +90,6 @@ function _instrumentEmberRouter(
9290
9391 const url = _getLocationURL ( location ) ;
9492
95- const client = getClient < BrowserClient > ( ) ;
96-
97- if ( ! client ) {
98- return ;
99- }
100-
10193 if ( url && instrumentPageLoad !== false ) {
10294 const routeInfo = routerService . recognize ( url ) ;
10395 activeRootSpan = startBrowserTracingPageLoadSpan ( client , {
0 commit comments