Skip to content

Commit ff918f0

Browse files
authored
feat(browser): Exclude span exports from non-performance CDN bundles (#10879)
I figured we don't actually need to expor these (e.g. `startSpan`, etc.) in non-performance CDN bundles. We can think about providing shims for these, but honestly not so sure 🤔
1 parent 68fa29e commit ff918f0

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

packages/browser/src/exports.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ export {
4545
Scope,
4646
// eslint-disable-next-line deprecation/deprecation
4747
startTransaction,
48-
getActiveSpan,
49-
startSpan,
50-
startInactiveSpan,
51-
startSpanManual,
5248
continueTrace,
5349
SDK_VERSION,
5450
setContext,
@@ -59,7 +55,6 @@ export {
5955
setUser,
6056
withScope,
6157
withIsolationScope,
62-
withActiveSpan,
6358
functionToStringIntegration,
6459
inboundFiltersIntegration,
6560
dedupeIntegration,

packages/browser/src/index.bundle.tracing.replay.feedback.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Sentry.Integrations.Replay = Replay;
1414
// We are patching the global object with our hub extension methods
1515
addTracingExtensions();
1616

17+
export {
18+
getActiveSpan,
19+
startSpan,
20+
startInactiveSpan,
21+
startSpanManual,
22+
withActiveSpan,
23+
} from '@sentry/core';
24+
1725
export {
1826
// eslint-disable-next-line deprecation/deprecation
1927
Feedback,

packages/browser/src/index.bundle.tracing.replay.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Sentry.Integrations.Replay = Replay;
1414
// We are patching the global object with our hub extension methods
1515
addTracingExtensions();
1616

17+
export {
18+
getActiveSpan,
19+
startSpan,
20+
startInactiveSpan,
21+
startSpanManual,
22+
withActiveSpan,
23+
} from '@sentry/core';
24+
1725
export {
1826
// eslint-disable-next-line deprecation/deprecation
1927
FeedbackShim as Feedback,

packages/browser/src/index.bundle.tracing.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Sentry.Integrations.Replay = ReplayShim;
1919
// We are patching the global object with our hub extension methods
2020
addTracingExtensions();
2121

22+
export {
23+
getActiveSpan,
24+
startSpan,
25+
startInactiveSpan,
26+
startSpanManual,
27+
withActiveSpan,
28+
} from '@sentry/core';
29+
2230
export {
2331
// eslint-disable-next-line deprecation/deprecation
2432
FeedbackShim as Feedback,

packages/browser/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ export {
7070
export type { RequestInstrumentationOptions } from '@sentry-internal/tracing';
7171
export {
7272
addTracingExtensions,
73+
getActiveSpan,
74+
startSpan,
75+
startInactiveSpan,
76+
startSpanManual,
77+
withActiveSpan,
7378
setMeasurement,
7479
// eslint-disable-next-line deprecation/deprecation
7580
getActiveTransaction,

0 commit comments

Comments
 (0)