Skip to content

Commit c99094a

Browse files
authored
feat(feature-flags): v7: Expose featureFlagsIntegration (#4984)
* feat(feature-flags): Expose featureFlagsIntegration * Add sample integration * Add changelog
1 parent fdae0e0 commit c99094a

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
- Automatically detect Release name and version for Expo Web ([#4967](https://github.com/getsentry/sentry-react-native/pull/4967))
1414

15+
### Changes
16+
17+
- Expose `featureFlagsIntegration` ([#4984](https://github.com/getsentry/sentry-react-native/pull/4984))
18+
1519
### Breaking changes
1620

1721
- Tags formatting logic updated ([#4965](https://github.com/getsentry/sentry-react-native/pull/4965))

packages/core/src/js/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ export {
5656
withProfiler,
5757
} from '@sentry/react';
5858

59-
export { logger, consoleLoggingIntegration } from '@sentry/browser';
59+
export {
60+
logger,
61+
consoleLoggingIntegration,
62+
featureFlagsIntegration,
63+
type FeatureFlagsIntegration,
64+
} from '@sentry/browser';
6065

6166
export * from './integrations/exports';
6267

samples/react-native/src/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ const reactNavigationIntegration = Sentry.reactNavigationIntegration({
5858
useDispatchedActionData: true,
5959
});
6060

61+
const sampleFeatureFlagsIntegration = Sentry.featureFlagsIntegration();
62+
sampleFeatureFlagsIntegration.addFeatureFlag('sample-test-flag', true);
63+
6164
Sentry.init({
6265
// Replace the example DSN below with your own DSN:
6366
dsn: getDsn(),
@@ -149,6 +152,7 @@ Sentry.init({
149152
},
150153
}),
151154
Sentry.extraErrorDataIntegration(),
155+
sampleFeatureFlagsIntegration,
152156
);
153157
return integrations.filter(i => i.name !== 'Dedupe');
154158
},

0 commit comments

Comments
 (0)