Skip to content

Commit 7fc479f

Browse files
authored
ref(core): Reduce hasTracingEnabled size (#13232)
Inlining the function removes the function declaration from the bundle.
1 parent ddff302 commit 7fc479f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/core/src/utils/hasTracingEnabled.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ export function hasTracingEnabled(
1616
return false;
1717
}
1818

19-
const options = maybeOptions || getClientOptions();
19+
const client = getClient();
20+
const options = maybeOptions || (client && client.getOptions());
2021
// eslint-disable-next-line deprecation/deprecation
2122
return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);
2223
}
23-
24-
function getClientOptions(): Options | undefined {
25-
const client = getClient();
26-
return client && client.getOptions();
27-
}

0 commit comments

Comments
 (0)