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 {
7
7
} ;
8
8
9
9
window . Sentry = Sentry ;
10
- window . sentryUnleashIntegration = Sentry . unleashIntegration ( { unleashClientClass : window . UnleashClient } ) ;
10
+ window . sentryUnleashIntegration = Sentry . unleashIntegration ( { featureFlagClientClass : window . UnleashClient } ) ;
11
11
12
12
Sentry . init ( {
13
13
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 {
41
41
} ;
42
42
43
43
window . Sentry = Sentry ;
44
- window . sentryUnleashIntegration = Sentry . unleashIntegration ( { unleashClientClass : window . UnleashClient } ) ;
44
+ window . sentryUnleashIntegration = Sentry . unleashIntegration ( { featureFlagClientClass : window . UnleashClient } ) ;
45
45
46
46
Sentry . init ( {
47
47
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';
5
5
import { copyFlagsFromScopeToEvent , insertFlagToScope } from '../../../utils/featureFlags' ;
6
6
import type { UnleashClient , UnleashClientClass } from './types' ;
7
7
8
+ type UnleashIntegrationOptions = {
9
+ featureFlagClientClass : UnleashClientClass ;
10
+ } ;
11
+
8
12
/**
9
13
* Sentry integration for capturing feature flag evaluations from the Unleash SDK.
10
14
*
@@ -17,19 +21,18 @@ import type { UnleashClient, UnleashClientClass } from './types';
17
21
*
18
22
* Sentry.init({
19
23
* dsn: '___PUBLIC_DSN___',
20
- * integrations: [Sentry.unleashIntegration({unleashClientClass : UnleashClient})],
24
+ * integrations: [Sentry.unleashIntegration({featureFlagClientClass : UnleashClient})],
21
25
* });
22
26
*
23
27
* const unleash = new UnleashClient(...);
24
28
* unleash.start();
25
29
*
26
30
* unleash.isEnabled('my-feature');
27
- * unleash.getVariant('other-feature');
28
31
* Sentry.captureException(new Error('something went wrong'));
29
32
* ```
30
33
*/
31
34
export const unleashIntegration = defineIntegration (
32
- ( { unleashClientClass } : { unleashClientClass : UnleashClientClass } ) => {
35
+ ( { featureFlagClientClass : unleashClientClass } : UnleashIntegrationOptions ) => {
33
36
return {
34
37
name : 'Unleash' ,
35
38
You can’t perform that action at this time.
0 commit comments