Skip to content

Commit 6aacba0

Browse files
committed
fix(react): restore uiProfiler on curated @sentry/react exports
uiProfiler was part of the public @sentry/browser exports re-exported via export * from @sentry/react. The curated browser-api list omitted it, which would break import { uiProfiler } from '@sentry/react' (and framework SDKs that re-export the React surface).
1 parent 8f76c80 commit 6aacba0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/react/src/browser-api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ export {
9494
opera11StackLineParser,
9595
winjsStackLineParser,
9696
makeFetchTransport,
97+
// Manual UI profiling API (pairs with browserProfilingIntegration from
98+
// optional-browser-api / @sentry/browser). Was on the pre-curation public
99+
// surface via export * from @sentry/browser.
100+
uiProfiler,
97101
// Scope helpers
98102
metrics,
99103
onLoad,

packages/react/test/exports.treeshake.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ describe('@sentry/react export surface (tree-shaking)', () => {
2121
expect(typeof SentryReact.thirdPartyErrorFilterIntegration).toBe('function');
2222
expect(typeof SentryReact.ErrorBoundary).toBe('function');
2323
expect(typeof SentryReact.reactErrorHandler).toBe('function');
24+
// Public API previously re-exported via export * from @sentry/browser
25+
expect(SentryReact.uiProfiler).toBeDefined();
26+
expect(typeof SentryReact.uiProfiler.startProfiler).toBe('function');
27+
expect(typeof SentryReact.uiProfiler.stopProfiler).toBe('function');
2428
});
2529

2630
it('does not export optional heavy browser features from the root entry', () => {

0 commit comments

Comments
 (0)