File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
dev-packages/browser-integration-tests/suites/integrations/featureFlags/unleash
packages/browser/src/integrations/featureFlags/unleash Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ window.UnleashClient = class {
77} ;
88
99window . Sentry = Sentry ;
10- window . sentryUnleashIntegration = Sentry . unleashIntegration ( { unleashClientClass : window . UnleashClient } ) ;
10+ window . sentryUnleashIntegration = Sentry . unleashIntegration ( { featureFlagClientClass : window . UnleashClient } ) ;
1111
1212Sentry . init ( {
1313 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ window.UnleashClient = class {
4141} ;
4242
4343window . Sentry = Sentry ;
44- window . sentryUnleashIntegration = Sentry . unleashIntegration ( { unleashClientClass : window . UnleashClient } ) ;
44+ window . sentryUnleashIntegration = Sentry . unleashIntegration ( { featureFlagClientClass : window . UnleashClient } ) ;
4545
4646Sentry . init ( {
4747 dsn : 'https://public@dsn.ingest.sentry.io/1337' ,
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ import { DEBUG_BUILD } from '../../../debug-build';
55import { copyFlagsFromScopeToEvent , insertFlagToScope } from '../../../utils/featureFlags' ;
66import type { UnleashClient , UnleashClientClass } from './types' ;
77
8+ type UnleashIntegrationOptions = {
9+ featureFlagClientClass : UnleashClientClass ;
10+ } ;
11+
812/**
913 * Sentry integration for capturing feature flag evaluations from the Unleash SDK.
1014 *
@@ -17,19 +21,18 @@ import type { UnleashClient, UnleashClientClass } from './types';
1721 *
1822 * Sentry.init({
1923 * dsn: '___PUBLIC_DSN___',
20- * integrations: [Sentry.unleashIntegration({unleashClientClass : UnleashClient})],
24+ * integrations: [Sentry.unleashIntegration({featureFlagClientClass : UnleashClient})],
2125 * });
2226 *
2327 * const unleash = new UnleashClient(...);
2428 * unleash.start();
2529 *
2630 * unleash.isEnabled('my-feature');
27- * unleash.getVariant('other-feature');
2831 * Sentry.captureException(new Error('something went wrong'));
2932 * ```
3033 */
3134export const unleashIntegration = defineIntegration (
32- ( { unleashClientClass } : { unleashClientClass : UnleashClientClass } ) => {
35+ ( { featureFlagClientClass : unleashClientClass } : UnleashIntegrationOptions ) => {
3336 return {
3437 name : 'Unleash' ,
3538
You can’t perform that action at this time.
0 commit comments