Skip to content

Commit

Permalink
Change integration input to an options dict
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed Jan 15, 2025
1 parent dbf0f64 commit ba090a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/1337',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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___',
Expand All @@ -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',

Expand Down

0 comments on commit ba090a2

Please sign in to comment.