Skip to content

Commit a1bcf73

Browse files
committed
feat(tracing): Allow to pass client to startBrowserTracing*Span utils
1 parent 71b8ac1 commit a1bcf73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/tracing-internal/src/browser/browserTracingIntegration.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
395395
* Manually start a page load span.
396396
* This will only do something if the BrowserTracing integration has been setup.
397397
*/
398-
export function startBrowserTracingPageLoadSpan(spanOptions: StartSpanOptions): void {
399-
const client = getClient();
398+
export function startBrowserTracingPageLoadSpan(spanOptions: StartSpanOptions, client = getClient()): void {
400399
if (!client || !client.emit) {
401400
return;
402401
}
@@ -408,8 +407,7 @@ export function startBrowserTracingPageLoadSpan(spanOptions: StartSpanOptions):
408407
* Manually start a navigation span.
409408
* This will only do something if the BrowserTracing integration has been setup.
410409
*/
411-
export function startBrowserTracingNavigationSpan(spanOptions: StartSpanOptions): void {
412-
const client = getClient();
410+
export function startBrowserTracingNavigationSpan(spanOptions: StartSpanOptions, client = getClient()): void {
413411
if (!client || !client.emit) {
414412
return;
415413
}

0 commit comments

Comments
 (0)