From ba090a28efc69768ae5cf908548ef4a931b3b4da Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:46:59 -0800 Subject: [PATCH] Change integration input to an options dict --- .../suites/integrations/featureFlags/unleash/init.js | 2 +- .../src/integrations/featureFlags/unleash/integration.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/unleash/init.js b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/unleash/init.js index 301f8da7ad50..2a991bfde3f0 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/featureFlags/unleash/init.js +++ b/dev-packages/browser-integration-tests/suites/integrations/featureFlags/unleash/init.js @@ -41,7 +41,7 @@ window.UnleashClient = class { }; window.Sentry = Sentry; -window.sentryUnleashIntegration = Sentry.unleashIntegration(window.UnleashClient); +window.sentryUnleashIntegration = Sentry.unleashIntegration({unleashClientClass: window.UnleashClient}); Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', diff --git a/packages/browser/src/integrations/featureFlags/unleash/integration.ts b/packages/browser/src/integrations/featureFlags/unleash/integration.ts index eb7df04b8a2e..608ca4200eb3 100644 --- a/packages/browser/src/integrations/featureFlags/unleash/integration.ts +++ b/packages/browser/src/integrations/featureFlags/unleash/integration.ts @@ -14,7 +14,7 @@ import type { UnleashClient, UnleashClientClass } from './types'; * import { UnleashClient } from 'unleash-proxy-client'; * import * as Sentry from '@sentry/browser'; * - * const unleashIntegration = Sentry.unleashIntegration(UnleashClient); + * const unleashIntegration = Sentry.unleashIntegration({unleashClientClass: UnleashClient}); * * Sentry.init({ * dsn: '___PUBLIC_DSN___', @@ -29,7 +29,7 @@ import type { UnleashClient, UnleashClientClass } from './types'; * Sentry.captureException(new Error('something went wrong')); * ``` */ -export const unleashIntegration = defineIntegration((unleashClientClass: UnleashClientClass) => { +export const unleashIntegration = defineIntegration(({unleashClientClass}: {unleashClientClass: UnleashClientClass}) => { return { name: 'Unleash',