diff --git a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/errorHook/init.js b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/errorHook/init.js index 606717d69dd7..8e96c186503f 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/errorHook/init.js +++ b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/errorHook/init.js @@ -16,7 +16,7 @@ window.openFeatureClient = { }; window.Sentry = Sentry; -window.sentryOpenFeatureIntegration = Sentry.openFeatureIntegration(window.openFeatureClient); +window.sentryOpenFeatureIntegration = Sentry.openFeatureIntegration({openFeatureClient: window.openFeatureClient}); Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', diff --git a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/init.js b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/init.js index fdad88250cb7..78a4812b3489 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/init.js +++ b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/openfeature/init.js @@ -16,7 +16,7 @@ window.openFeatureClient = { }; window.Sentry = Sentry; -window.sentryOpenFeatureIntegration = Sentry.openFeatureIntegration(window.openFeatureClient); +window.sentryOpenFeatureIntegration = Sentry.openFeatureIntegration({openFeatureClient: window.openFeatureClient}); Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 907361601498..b1c3826962a4 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -74,4 +74,4 @@ export { type FeatureFlagsIntegration, } from './integrations/featureFlags'; export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integrations/featureFlags/launchdarkly'; -export { openFeatureIntegration } from './integrations/featureFlags/openfeature'; +export { openFeatureIntegration, type OpenFeatureIntegrationOptions } from './integrations/featureFlags/openfeature'; diff --git a/packages/browser/src/integrations/featureFlags/openfeature/index.ts b/packages/browser/src/integrations/featureFlags/openfeature/index.ts index 9c14fad73798..4b1ecee94ae6 100644 --- a/packages/browser/src/integrations/featureFlags/openfeature/index.ts +++ b/packages/browser/src/integrations/featureFlags/openfeature/index.ts @@ -1 +1 @@ -export { openFeatureIntegration } from './integration'; +export { openFeatureIntegration, type OpenFeatureIntegrationOptions } from './integration'; diff --git a/packages/browser/src/integrations/featureFlags/openfeature/integration.ts b/packages/browser/src/integrations/featureFlags/openfeature/integration.ts index 1cf2f4ba4579..52133c6d4665 100644 --- a/packages/browser/src/integrations/featureFlags/openfeature/integration.ts +++ b/packages/browser/src/integrations/featureFlags/openfeature/integration.ts @@ -11,7 +11,11 @@ import type { EvaluationDetails, HookContext, HookHints, JsonValue, OpenFeatureC import { defineIntegration } from '@sentry/core'; import { copyFlagsFromScopeToEvent, insertFlagToScope } from '../../../utils/featureFlags'; -export const openFeatureIntegration = defineIntegration((openFeatureClient: OpenFeatureClient) => { +export type OpenFeatureIntegrationOptions = { + openFeatureClient: OpenFeatureClient; +}; + +export const openFeatureIntegration = defineIntegration(({openFeatureClient}: OpenFeatureIntegrationOptions) => { return { name: 'OpenFeature',